From aa5d6e0ce30d01e57ec054335693c802adcbf705 Mon Sep 17 00:00:00 2001 From: Alexandra Betouni <31625338+alexandraB99@users.noreply.github.com> Date: Sat, 30 Oct 2021 00:15:33 +0300 Subject: [PATCH] =?UTF-8?q?Fix=20setting=20user=20as=20offline=20doesn?= =?UTF-8?q?=E2=80=99t=20show=20user=20offline=20in=20the=20client?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/app/AppLayouts/Chat/ChatLayout.qml | 3 +++ .../Chat/panels/communities/CommunityUserListPanel.qml | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/app/AppLayouts/Chat/ChatLayout.qml b/ui/app/AppLayouts/Chat/ChatLayout.qml index 7b4f38ab26..2aecce7d26 100644 --- a/ui/app/AppLayouts/Chat/ChatLayout.qml +++ b/ui/app/AppLayouts/Chat/ChatLayout.qml @@ -182,6 +182,9 @@ StatusAppThreePanelLayout { profilePubKey: root.rootStore.profileModelInst.profile.pubKey contactsList: root.rootStore.profileModelInst.contacts.list community: root.rootStore.chatsModelInst.communities.activeCommunity + currentUserName: Utils.removeStatusEns(root.rootStore.profileModelInst.ens.preferredUsername + || root.rootStore.profileModelInst.profile.username) + currentUserOnline: root.rootStore.profileModelInst.profile.sendUserStatus } } diff --git a/ui/app/AppLayouts/Chat/panels/communities/CommunityUserListPanel.qml b/ui/app/AppLayouts/Chat/panels/communities/CommunityUserListPanel.qml index 98745116b5..0f315bf7cb 100644 --- a/ui/app/AppLayouts/Chat/panels/communities/CommunityUserListPanel.qml +++ b/ui/app/AppLayouts/Chat/panels/communities/CommunityUserListPanel.qml @@ -25,6 +25,8 @@ Item { property string profilePubKey property var messageContextMenu property var community + property string currentUserName: "" + property bool currentUserOnline: true StyledText { id: titleText @@ -91,7 +93,8 @@ Item { lastSeen: model.lastSeen statusType: model.statusType currentTime: root.currentTime - isOnline: model.online + isOnline: (model.userName === root.currentUserName) ? + root.currentUserOnline : model.online contactsList: root.contactsList profilePubKey: root.profilePubKey messageContextMenu: root.messageContextMenu