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:
parent
ddeda6c106
commit
5a4dde1d5c
|
@ -17,11 +17,11 @@ const DEFAULT_IS_BROWSER_ENABLED = false
|
||||||
const LSS_KEY_IS_ACTIVITY_CENTER_ENABLED* = "isActivityCenterEnabled"
|
const LSS_KEY_IS_ACTIVITY_CENTER_ENABLED* = "isActivityCenterEnabled"
|
||||||
const DEFAULT_IS_ACTIVITY_CENTER_ENABLED = false
|
const DEFAULT_IS_ACTIVITY_CENTER_ENABLED = false
|
||||||
const LSS_KEY_SHOW_ONLINE_USERS* = "showOnlineUsers"
|
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 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 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 LSS_KEY_IS_MULTI_NETWORK_ENABLED* = "isMultiNetworkEnabled"
|
||||||
const DEFAULT_IS_MULTI_NETWORK_ENABLED = false
|
const DEFAULT_IS_MULTI_NETWORK_ENABLED = false
|
||||||
const LSS_KEY_IS_TENOR_WARNING_ACCEPTED* = "isTenorWarningAccepted"
|
const LSS_KEY_IS_TENOR_WARNING_ACCEPTED* = "isTenorWarningAccepted"
|
||||||
|
|
|
@ -84,9 +84,12 @@ StatusAppThreePanelLayout {
|
||||||
if (!localAccountSensitiveSettings.showOnlineUsers || !localAccountSensitiveSettings.expandUsersList) {
|
if (!localAccountSensitiveSettings.showOnlineUsers || !localAccountSensitiveSettings.expandUsersList) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
let chatContentModule = root.rootStore.currentChatContentModule()
|
let chatContentModule = root.rootStore.currentChatContentModule()
|
||||||
if (!chatContentModule) {
|
if (!chatContentModule
|
||||||
// New communities have no chats, so no chatContentModule
|
|| chatContentModule.chatDetails.type === Constants.chatType.publicChat)
|
||||||
|
{
|
||||||
|
// New communities have no chats, so no chatContentModule or it is a public chat
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
// Check if user list is available as an option for particular chat content module
|
// Check if user list is available as an option for particular chat content module
|
||||||
|
|
|
@ -141,7 +141,7 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
membersButton.visible: {
|
membersButton.visible: {
|
||||||
if(!chatContentModule)
|
if(!chatContentModule || chatContentModule.chatDetails.type === Constants.chatType.publicChat)
|
||||||
return false
|
return false
|
||||||
|
|
||||||
return localAccountSensitiveSettings.showOnlineUsers &&
|
return localAccountSensitiveSettings.showOnlineUsers &&
|
||||||
|
|
|
@ -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
|
// TODO: replace with StatusQ component
|
||||||
StatusSettingsLineButton {
|
StatusSettingsLineButton {
|
||||||
text: qsTr("Multi network")
|
text: qsTr("Multi network")
|
||||||
|
|
Loading…
Reference in New Issue