diff --git a/ui/app/AppMain.qml b/ui/app/AppMain.qml index 8d6881bf5d..8733f60fec 100644 --- a/ui/app/AppMain.qml +++ b/ui/app/AppMain.qml @@ -363,8 +363,8 @@ Item { badge.implicitHeight: 15 badge.implicitWidth: 15 badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusAppNavBar.backgroundColor - badge.color: { - return profileModule.model.sendUserStatus ? Style.current.green : Style.current.midGrey + //badge.color: profileModule.model.sendUserStatus ? Style.current.green : Style.current.midGrey + badge.color: appMain.rootStore.profileModelInst.profile.sendUserStatus ? Style.current.green : Style.current.midGrey /* // Use this code once support for custom user status is added switch(profileModel.profile.currentUserStatus){ @@ -375,7 +375,6 @@ Item { default: return Style.current.midGrey; }*/ - } badge.border.width: 3 onClicked: { userStatusContextMenu.opened ? @@ -386,6 +385,7 @@ Item { UserStatusContextMenu { id: userStatusContextMenu y: profileButton.y - userStatusContextMenu.height + store: appMain.rootStore } } } diff --git a/ui/imports/shared/popups/UserStatusContextMenu.qml b/ui/imports/shared/popups/UserStatusContextMenu.qml index 75b2b1332f..a52fdb5fd7 100644 --- a/ui/imports/shared/popups/UserStatusContextMenu.qml +++ b/ui/imports/shared/popups/UserStatusContextMenu.qml @@ -12,6 +12,7 @@ import StatusQ.Components 0.1 // TODO: replace with StatusPopupMenu PopupMenu { id: root + property var store width: profileHeader.width closePolicy: Popup.CloseOnReleaseOutsideParent | Popup.CloseOnEscape @@ -34,7 +35,7 @@ PopupMenu { } StyledText { id: username - text: Utils.removeStatusEns(profileModel.ens.preferredUsername || profileModule.model.username) + text: Utils.removeStatusEns(root.store.profileModelInst.ens.preferredUsername || profileModule.model.username) elide: Text.ElideRight maximumLineCount: 3 horizontalAlignment: Text.AlignHCenter @@ -86,8 +87,8 @@ PopupMenu { Action { text: qsTr("Online") onTriggered: { - if (profileModule.sendUserStatus != true) { - profileModule.setSendUserStatus(true) + if (root.store.profileModelInst.profile.sendUserStatus != true) { + root.store.profileModelInst.profile.setSendUserStatus(true) } root.close() } @@ -100,8 +101,8 @@ PopupMenu { Action { text: qsTr("Offline") onTriggered: { - if (profileModule.sendUserStatus != false) { - profileModule.setSendUserStatus(false) + if (root.store.profileModelInst.profile.sendUserStatus != false) { + root.store.profileModelInst.profile.setSendUserStatus(false) } root.close() }