From 470144db6a63ac1b7256c096d396ce6c75314445 Mon Sep 17 00:00:00 2001 From: Alexandra Betouni <31625338+alexandraB99@users.noreply.github.com> Date: Tue, 14 Sep 2021 13:09:40 +0300 Subject: [PATCH] feat(desktop/members) Improvements in members list * The userlist toggle made persistent between restarts * Members is enabled by default for communities * Public channels changed title to "last seen" instead of "Members" Closes #3502 --- ui/app/AppLayouts/Chat/ChatColumn.qml | 10 +++++----- ui/app/AppLayouts/Chat/ChatColumn/UserList.qml | 2 +- ui/app/AppLayouts/Chat/ChatLayout.qml | 3 ++- ui/app/AppMain.qml | 1 + 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ui/app/AppLayouts/Chat/ChatColumn.qml b/ui/app/AppLayouts/Chat/ChatColumn.qml index f2021ef49f..7c7c97f05a 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn.qml @@ -29,7 +29,6 @@ Item { property bool isExtendedInput: isReply || isImage property bool isConnected: false property string contactToRemove: "" - property bool showUsers: false property string activeChatId: chatsModel.channelView.activeChannel.id property bool isBlocked: profileModel.contacts.isContactBlocked(activeChatId) property bool isContact: profileModel.contacts.isAdded(activeChatId) @@ -206,15 +205,16 @@ Item { } } - membersButton.visible: appSettings.showOnlineUsers && chatsModel.channelView.activeChannel.chatType !== Constants.chatTypeOneToOne - membersButton.highlighted: showUsers + membersButton.visible: (appSettings.showOnlineUsers || chatsModel.communities.activeCommunity.active) + && chatsModel.channelView.activeChannel.chatType !== Constants.chatTypeOneToOne + membersButton.highlighted: appSettings.expandUsersList notificationButton.visible: appSettings.isActivityCenterEnabled - notificationButton.tooltip.offset: showUsers ? 0 : 14 + notificationButton.tooltip.offset: appSettings.expandUsersList ? 0 : 14 notificationCount: chatsModel.activityNotificationList.unreadCount onSearchButtonClicked: searchPopup.open() - onMembersButtonClicked: showUsers = !showUsers + onMembersButtonClicked: appSettings.expandUsersList = !appSettings.expandUsersList onNotificationButtonClicked: activityCenter.open() popupMenu: ChatContextMenu { diff --git a/ui/app/AppLayouts/Chat/ChatColumn/UserList.qml b/ui/app/AppLayouts/Chat/ChatColumn/UserList.qml index 8058479f63..faf0936053 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn/UserList.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn/UserList.qml @@ -31,7 +31,7 @@ Item { visible: (opacity > 0.1) font.pixelSize: Style.current.primaryTextFontSize //% "Members" - text: qsTrId("members-label") + text: qsTr("Last seen") } ListView { diff --git a/ui/app/AppLayouts/Chat/ChatLayout.qml b/ui/app/AppLayouts/Chat/ChatLayout.qml index 88ad261d04..0acc67d124 100644 --- a/ui/app/AppLayouts/Chat/ChatLayout.qml +++ b/ui/app/AppLayouts/Chat/ChatLayout.qml @@ -159,7 +159,8 @@ StatusAppThreePanelLayout { chatGroupsListViewCount: contactColumnLoader.item.chatGroupsListViewCount } - showRightPanel: chatColumn.showUsers && (chatsModel.channelView.activeChannel.chatType !== Constants.chatTypeOneToOne) + showRightPanel: (appSettings.expandUsersList && (appSettings.showOnlineUsers || chatsModel.communities.activeCommunity.active) + && (chatsModel.channelView.activeChannel.chatType !== Constants.chatTypeOneToOne)) rightPanel: appSettings.communitiesEnabled && chatsModel.communities.activeCommunity.active ? communityUserListComponent : userListComponent Component { diff --git a/ui/app/AppMain.qml b/ui/app/AppMain.qml index ca94bc9e49..0b3d8e35c9 100644 --- a/ui/app/AppMain.qml +++ b/ui/app/AppMain.qml @@ -162,6 +162,7 @@ Item { property bool isBrowserEnabled: false property bool isActivityCenterEnabled: false property bool showOnlineUsers: false + property bool expandUsersList: false property bool isGifWidgetEnabled: false property bool isTenorWarningAccepted: false property bool displayChatImages: false