mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-04 17:17:39 +00:00
android, desktop: show the open chat's mute state in the chat menu
The mute item of the chat header menu kept the mute state it first saw: after switching chats, such as opening a member's direct chat from a group, it offered the previous chat's next mode, and it missed muting done elsewhere, such as from the chat info. Read the item's next mode from the chat's own setting.
This commit is contained in:
1 parent
84b0cf5507
commit
25febe6d58
1 file changed
+1
-1
+1
-1
@@ -1356,7 +1356,7 @@ fun BoxScope.ChatInfoToolbar(
|
||||
val enableNtfs = chatInfo.chatSettings?.enableNtfs
|
||||
if (((chatInfo is ChatInfo.Direct && chatInfo.contact.ready && chatInfo.contact.active) || chatInfo is ChatInfo.Group) && enableNtfs != null) {
|
||||
val ntfMode = remember { mutableStateOf(enableNtfs) }
|
||||
val nextNtfMode by remember { derivedStateOf { ntfMode.value.nextMode(chatInfo.hasMentions) } }
|
||||
val nextNtfMode = enableNtfs.nextMode(chatInfo.hasMentions)
|
||||
menuItems.add {
|
||||
ItemAction(
|
||||
stringResource(nextNtfMode.text(chatInfo.hasMentions)),
|
||||
|
||||
Reference in new issue
Block a user