Page MenuHomePhorge

D86.1732340391.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D86.1732340391.diff

diff --git a/src/contents/ui/event-types/Simple.qml b/src/contents/ui/event-types/Simple.qml
--- a/src/contents/ui/event-types/Simple.qml
+++ b/src/contents/ui/event-types/Simple.qml
@@ -65,7 +65,7 @@
TapHandler {
onTapped: {
- activateUserPage(sender, room);
+ activateUserPage(sender, room, event.sender);
}
}
}
diff --git a/src/contents/ui/main.qml b/src/contents/ui/main.qml
--- a/src/contents/ui/main.qml
+++ b/src/contents/ui/main.qml
@@ -181,9 +181,9 @@
});
}
- function activateUserPage(user, room) {
+ function activateUserPage(user, room, userId) {
pageStack.push(Qt.resolvedUrl("qrc:///UserPage.qml"), {
- userId: user.userId,
+ userId: userId || user.userId,
user,
room
});
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
@@ -534,5 +534,13 @@
obj.isGapped = false;
verify(item.paginateBackRequested.calledTimes() === 0);
}
+
+ function test_avatarClick() {
+ const avatar = findChild(eventViewText, 'senderAvatar');
+ mouseClick(avatar);
+ tryVerify(() => item.activateUserPage.calledTimes() === 1);
+ // verify that the user id is passed
+ verify(item.activateUserPage.lastArgs()[2] === '@foo:tusooa.xyz');
+ }
}
}

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 22, 9:39 PM (12 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39124
Default Alt Text
D86.1732340391.diff (1 KB)

Event Timeline