mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-21 20:09:37 +00:00
parent
5e8e897acc
commit
076a5bc5b7
@ -471,6 +471,15 @@ QtObject:
|
||||
chat.muted = true
|
||||
return chat
|
||||
|
||||
proc setCommunityMuted*(self: CommunitiesView, communityId: string, muted: bool) {.slot.} =
|
||||
self.status.chat.setCommunityMuted(communityId, muted)
|
||||
if (communityId == self.activeCommunity.communityItem.id):
|
||||
self.activeCommunity.setMuted(muted)
|
||||
|
||||
var community = self.joinedCommunityList.getCommunityById(communityId)
|
||||
community.muted = muted
|
||||
self.joinedCommunityList.replaceCommunity(community)
|
||||
|
||||
proc markNotificationsAsRead*(self: CommunitiesView, markAsReadProps: MarkAsReadNotificationProperties) =
|
||||
if(markAsReadProps.communityId.len == 0 and markAsReadProps.channelId.len == 0):
|
||||
# Remove all notifications from all communities and their channels for set types.
|
||||
|
@ -98,7 +98,7 @@ Column {
|
||||
components: [
|
||||
StatusSwitch {
|
||||
checked: !root.community.muted
|
||||
onClicked: root.notificationsButtonClicked(checked)
|
||||
onClicked: root.notificationsButtonClicked(!checked)
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user