Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F172273
D86.1741785817.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D86.1741785817.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, Mar 12, 6:23 AM (2 h, 21 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
73543
Default Alt Text
D86.1741785817.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
Log In to Comment