[Notification mode] Wrong mode is displayed when the mention only is selected on the web client
This commit is contained in:
parent
99b43fd771
commit
d1bca78083
1
changelog.d/5547.bugfix
Normal file
1
changelog.d/5547.bugfix
Normal file
@ -0,0 +1 @@
|
|||||||
|
[Notification mode] Wrong mode is displayed when the mention only is selected on the web client
|
@ -40,14 +40,16 @@ data class RoomNotificationSettingsViewState(
|
|||||||
*/
|
*/
|
||||||
val RoomNotificationSettingsViewState.notificationStateMapped: Async<RoomNotificationState>
|
val RoomNotificationSettingsViewState.notificationStateMapped: Async<RoomNotificationState>
|
||||||
get() {
|
get() {
|
||||||
if ((roomSummary()?.isEncrypted == true && notificationState() == RoomNotificationState.MENTIONS_ONLY) ||
|
return when {
|
||||||
notificationState() == RoomNotificationState.ALL_MESSAGES) {
|
/**
|
||||||
/** if in an encrypted room, mentions notifications are not supported so show "All Messages" as selected.
|
* if in an encrypted room, mentions notifications are not supported so show "None" as selected.
|
||||||
* Also in the new settings there is no notion of notifications without sound so it maps to noisy also
|
* Also in the new settings there is no notion of notifications without sound so it maps to noisy also
|
||||||
*/
|
*/
|
||||||
return Success(RoomNotificationState.ALL_MESSAGES_NOISY)
|
(roomSummary()?.isEncrypted == true && notificationState() == RoomNotificationState.MENTIONS_ONLY)
|
||||||
|
-> Success(RoomNotificationState.MUTE)
|
||||||
|
notificationState() == RoomNotificationState.ALL_MESSAGES -> Success(RoomNotificationState.ALL_MESSAGES_NOISY)
|
||||||
|
else -> notificationState
|
||||||
}
|
}
|
||||||
return notificationState
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user