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
This commit is contained in:
Alexandra Betouni 2021-09-14 13:09:40 +03:00 committed by Iuri Matias
parent d8e669d013
commit 470144db6a
4 changed files with 9 additions and 7 deletions

View File

@ -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 {

View File

@ -31,7 +31,7 @@ Item {
visible: (opacity > 0.1)
font.pixelSize: Style.current.primaryTextFontSize
//% "Members"
text: qsTrId("members-label")
text: qsTr("Last seen")
}
ListView {

View File

@ -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 {

View File

@ -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