diff --git a/ui/app/AppLayouts/Chat/ChatLayout.qml b/ui/app/AppLayouts/Chat/ChatLayout.qml index 376d67885f..0e9464ee2f 100644 --- a/ui/app/AppLayouts/Chat/ChatLayout.qml +++ b/ui/app/AppLayouts/Chat/ChatLayout.qml @@ -198,7 +198,7 @@ StatusAppThreePanelLayout { userList: chatColumn.userList messageContextMenu: quickActionMessageOptionsMenu profilePubKey: userProfile.pubKey - contactsList: root.rootStore.allContacts + contactsList: root.rootStore.profileModelInst.contacts.list isOnline: root.rootStore.chatsModelInst.isOnline } } diff --git a/ui/app/AppLayouts/Chat/popups/GroupChatPopup.qml b/ui/app/AppLayouts/Chat/popups/GroupChatPopup.qml index 9ae0deef39..b5a589ba67 100644 --- a/ui/app/AppLayouts/Chat/popups/GroupChatPopup.qml +++ b/ui/app/AppLayouts/Chat/popups/GroupChatPopup.qml @@ -41,7 +41,7 @@ ModalPopup { name: userProfile.username + " " + qsTrId("(you)"), pubKey: userProfile.pubKey, address: "", - identicon: "", + identicon: userProfile.identicon, thumbnailImage: userProfile.thumbnailImage, isUser: true }); diff --git a/ui/app/AppMain.qml b/ui/app/AppMain.qml index 2e39020a88..c703391542 100644 --- a/ui/app/AppMain.qml +++ b/ui/app/AppMain.qml @@ -356,18 +356,19 @@ Item { badge.implicitHeight: 15 badge.implicitWidth: 15 badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusAppNavBar.backgroundColor - /* - //This is still not in use. Read a comment for `currentUserStatus` in UserProfile on the nim side. - // Use this code once support for custom user status is added - switch(userProfile.currentUserStatus){ - case Constants.statusType_Online: - return Style.current.green; - case Constants.statusType_DoNotDisturb: - return Style.current.red; - default: - return Style.current.midGrey; - }*/ - badge.color: appMain.rootStore.userProfileInst.userStatus ? Style.current.green : Style.current.midGrey + badge.color: { + return userProfile.sendUserStatus ? Style.current.green : Style.current.midGrey + /* + // Use this code once support for custom user status is added + switch(userProfile.currentUserStatus){ + case Constants.statusType_Online: + return Style.current.green; + case Constants.statusType_DoNotDisturb: + return Style.current.red; + default: + return Style.current.midGrey; + }*/ + } badge.border.width: 3 onClicked: { userStatusContextMenu.opened ? diff --git a/ui/imports/shared/popups/UserStatusContextMenu.qml b/ui/imports/shared/popups/UserStatusContextMenu.qml index 2645a41774..8d2c664898 100644 --- a/ui/imports/shared/popups/UserStatusContextMenu.qml +++ b/ui/imports/shared/popups/UserStatusContextMenu.qml @@ -35,7 +35,7 @@ PopupMenu { } StyledText { id: username - text: Utils.removeStatusEns(root.store.profileModelInst.ens.preferredUsername || root.store.userProfileInst.username) + text: Utils.removeStatusEns(profileModel.ens.preferredUsername || userProfile.username) elide: Text.ElideRight maximumLineCount: 3 horizontalAlignment: Text.AlignHCenter @@ -71,7 +71,7 @@ PopupMenu { hoverEnabled: true cursorShape: Qt.PointingHandCursor onClicked: { - openProfilePopup(root.store.userProfileInst.username, root.store.userProfileInst.pubKey, root.store.userProfileInst.thumbnailImage) + openProfilePopup(userProfile.username, userProfile.pubKey, userProfile.thumbnailImage); root.close() } } @@ -86,8 +86,8 @@ PopupMenu { Action { text: qsTr("Online") onTriggered: { - if (!root.store.userProfileInst.sendUserStatus) { - root.store.mainModuleInst.setUserStatus(true) + if (userProfile.sendUserStatus != true) { + root.store.profileModelInst.profile.setSendUserStatus(true) } root.close(); } @@ -100,8 +100,8 @@ PopupMenu { Action { text: qsTr("Offline") onTriggered: { - if (root.store.userProfileInst.userStatus) { - root.store.mainModuleInst.setUserStatus(false) + if (userProfile.sendUserStatus != false) { + root.store.profileModelInst.profile.setSendUserStatus(false) } root.close(); }