fix(Communities): ensure app remembers hidden community intro banners
Fixes #1960
This commit is contained in:
parent
7bb8a968c9
commit
eefd56dd28
|
@ -128,7 +128,7 @@ Item {
|
||||||
|
|
||||||
CommunityWelcomeBanner {
|
CommunityWelcomeBanner {
|
||||||
id: emptyViewAndSuggestions
|
id: emptyViewAndSuggestions
|
||||||
visible: chatsModel.communities.activeCommunity.admin
|
visible: !appSettings.hiddenCommunityWelcomeBanners.includes(chatsModel.communities.activeCommunity.id) && chatsModel.communities.activeCommunity.admin
|
||||||
width: parent.width
|
width: parent.width
|
||||||
anchors.top: channelList.bottom
|
anchors.top: channelList.bottom
|
||||||
anchors.topMargin: Style.current.padding
|
anchors.topMargin: Style.current.padding
|
||||||
|
|
|
@ -46,7 +46,9 @@ Rectangle {
|
||||||
icon.width: 20
|
icon.width: 20
|
||||||
iconColor: Style.current.darkGrey
|
iconColor: Style.current.darkGrey
|
||||||
onClicked: {
|
onClicked: {
|
||||||
// TODO make this saved in the settings
|
let hiddenBannerIds = appSettings.hiddenCommunityWelcomeBanners
|
||||||
|
hiddenBannerIds.push(chatsModel.communities.activeCommunity.id)
|
||||||
|
appSettings.hiddenCommunityWelcomeBanners = hiddenBannerIds
|
||||||
root.visible = false
|
root.visible = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,6 +91,7 @@ RowLayout {
|
||||||
property bool timelineEnabled: true
|
property bool timelineEnabled: true
|
||||||
property string locale: "en"
|
property string locale: "en"
|
||||||
property var recentEmojis: []
|
property var recentEmojis: []
|
||||||
|
property var hiddenCommunityWelcomeBanners: []
|
||||||
property real volume: 0.2
|
property real volume: 0.2
|
||||||
property int notificationSetting: Constants.notifyAllMessages
|
property int notificationSetting: Constants.notifyAllMessages
|
||||||
property bool notificationSoundsEnabled: true
|
property bool notificationSoundsEnabled: true
|
||||||
|
|
Loading…
Reference in New Issue