Page MenuHomePhorge

D122.1732340785.diff
No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None

D122.1732340785.diff

diff --git a/src/contents/ui/Bubble.qml b/src/contents/ui/Bubble.qml
--- a/src/contents/ui/Bubble.qml
+++ b/src/contents/ui/Bubble.qml
@@ -191,10 +191,12 @@
HoverHandler { id: hoverHandlerEncIcon }
}
- Kirigami.Icon {
+ ToolButton {
objectName: 'localEchoIndicator'
visible: !!event.isLocalEcho
- source: event.isSending ? 'state-sync' : 'state-warning'
+ hoverEnabled: true
+ enabled: event.isFailed
+ icon.name: event.isSending ? 'state-sync' : 'state-warning'
Layout.preferredHeight: Kirigami.Units.iconSizes.medium
Layout.preferredWidth: Kirigami.Units.iconSizes.medium
Accessible.role: event.isSending ? Accessible.StaticText : Accessible.Button
@@ -202,15 +204,10 @@
ToolTip.text: event.isSending ? l10n.get('event-sending') : l10n.get('event-send-failed')
ToolTip.delay: 1000
ToolTip.timeout: 5000
- ToolTip.visible: hoverHandler.hovered
+ ToolTip.visible: hovered
- HoverHandler { id: hoverHandler }
- TapHandler {
- objectName: 'resendEventButton'
- onTapped: {
- room.resendMessage(event.txnId);
- }
- enabled: event.isFailed
+ onClicked: {
+ room.resendMessage(event.txnId);
}
}
diff --git a/src/tests/quick-tests/tst_EventView.qml b/src/tests/quick-tests/tst_EventView.qml
--- a/src/tests/quick-tests/tst_EventView.qml
+++ b/src/tests/quick-tests/tst_EventView.qml
@@ -412,10 +412,10 @@
function test_localEcho() {
const indicator = findChild(eventView, 'localEchoIndicator');
verify(indicator);
- verify(indicator.source === 'state-sync');
+ verify(indicator.icon.name === 'state-sync');
verify(indicator.Accessible.name === l10n.get('event-sending'));
- const resendButton = findChild(eventView, 'resendEventButton');
+ const resendButton = findChild(eventView, 'localEchoIndicator');
verify(resendButton);
verify(!resendButton.enabled);
@@ -426,7 +426,7 @@
const indicator = findChild(eventViewFailed, 'localEchoIndicator');
verify(indicator);
verify(indicator.visible);
- verify(indicator.source === 'state-warning');
+ verify(indicator.icon.name === 'state-warning');
verify(indicator.Accessible.name === l10n.get('event-resend'));
const menuComp = findChild(eventViewFailed, 'bubble').menuComp;

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 22, 9:46 PM (18 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38967
Default Alt Text
D122.1732340785.diff (2 KB)

Event Timeline