feat(chat): members availability and settings change

Don't show members in public chat
Show members in communities by default
Enable Gif Widget by default and remove settings entry
Enable Online users by default and remove settings entry

fixes #4906
This commit is contained in:
Stefan Dunca 2022-03-11 19:50:22 +01:00 committed by Iuri Matias
parent ddeda6c106
commit 5a4dde1d5c
4 changed files with 9 additions and 29 deletions

View File

@ -17,11 +17,11 @@ const DEFAULT_IS_BROWSER_ENABLED = false
const LSS_KEY_IS_ACTIVITY_CENTER_ENABLED* = "isActivityCenterEnabled"
const DEFAULT_IS_ACTIVITY_CENTER_ENABLED = false
const LSS_KEY_SHOW_ONLINE_USERS* = "showOnlineUsers"
const DEFAULT_SHOW_ONLINE_USERS = false
const DEFAULT_SHOW_ONLINE_USERS = true
const LSS_KEY_EXPAND_USERS_LIST* = "expandUsersList"
const DEFAULT_EXPAND_USERS_LIST = false
const DEFAULT_EXPAND_USERS_LIST = true
const LSS_KEY_IS_GIF_WIDGET_ENABLED* = "isGifWidgetEnabled"
const DEFAULT_IS_GIF_WIDGET_ENABLED = false
const DEFAULT_IS_GIF_WIDGET_ENABLED = true
const LSS_KEY_IS_MULTI_NETWORK_ENABLED* = "isMultiNetworkEnabled"
const DEFAULT_IS_MULTI_NETWORK_ENABLED = false
const LSS_KEY_IS_TENOR_WARNING_ACCEPTED* = "isTenorWarningAccepted"

View File

@ -84,9 +84,12 @@ StatusAppThreePanelLayout {
if (!localAccountSensitiveSettings.showOnlineUsers || !localAccountSensitiveSettings.expandUsersList) {
return false
}
let chatContentModule = root.rootStore.currentChatContentModule()
if (!chatContentModule) {
// New communities have no chats, so no chatContentModule
if (!chatContentModule
|| chatContentModule.chatDetails.type === Constants.chatType.publicChat)
{
// New communities have no chats, so no chatContentModule or it is a public chat
return false
}
// Check if user list is available as an option for particular chat content module

View File

@ -141,7 +141,7 @@ ColumnLayout {
}
membersButton.visible: {
if(!chatContentModule)
if(!chatContentModule || chatContentModule.chatDetails.type === Constants.chatType.publicChat)
return false
return localAccountSensitiveSettings.showOnlineUsers &&

View File

@ -188,29 +188,6 @@ ScrollView {
}
}
// TODO: replace with StatusQ component
StatusSettingsLineButton {
id: onlineUsers
//% "Online users"
text: qsTrId("online-users")
isSwitch: true
switchChecked: localAccountSensitiveSettings.showOnlineUsers
onClicked: {
root.advancedStore.toggleExperimentalFeature(root.advancedStore.experimentalFeatures.onlineUsers)
}
}
// TODO: replace with StatusQ component
StatusSettingsLineButton {
//% "GIF Widget"
text: qsTrId("gif-widget")
isSwitch: true
switchChecked: localAccountSensitiveSettings.isGifWidgetEnabled
onClicked: {
root.advancedStore.toggleExperimentalFeature(root.advancedStore.experimentalFeatures.gifWidget)
}
}
// TODO: replace with StatusQ component
StatusSettingsLineButton {
text: qsTr("Multi network")