Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85825020
D86.1793248612.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D86.1793248612.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 28, 9:36 PM (17 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1796587
Default Alt Text
D86.1793248612.diff (1 KB)
Attached To
Mode
D86: Fix loading room page when no such member event is in local state
Attached
Detach File
Event Timeline