Implement Notification Settings
- Add UI and logic to inform the user of mismatched notification settings and help them correct it. - Display a warning when the system notification settings are disabled and a link out to the app settings. - A toggle to disable notifications for the device - A screen for editing the group and direct chat notification defaults. - A toggle for switching on/off atRoom and call notifications.
This commit is contained in:
parent
9e27c2bdf0
commit
2f6f28bfbb
27 changed files with 924 additions and 59 deletions
|
|
@ -106,7 +106,7 @@ class RoomDetailsPresenter @Inject constructor(
|
|||
}
|
||||
RoomDetailsEvent.UnmuteNotification -> {
|
||||
scope.launch(dispatchers.io) {
|
||||
client.notificationSettingsService().unmuteRoom(room.roomId, room.isEncrypted, room.activeMemberCount)
|
||||
client.notificationSettingsService().unmuteRoom(room.roomId, room.isEncrypted, room.isOneToOne)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,8 +75,6 @@ class RoomNotificationSettingsPresenter @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
Timber.d("NotifState: $roomNotificationSettingsState")
|
||||
|
||||
return RoomNotificationSettingsState(
|
||||
roomNotificationSettings = roomNotificationSettingsState.roomNotificationSettings(),
|
||||
defaultRoomNotificationMode = defaultRoomNotificationMode.value,
|
||||
|
|
@ -97,7 +95,7 @@ class RoomNotificationSettingsPresenter @Inject constructor(
|
|||
private fun CoroutineScope.getDefaultRoomNotificationMode(defaultRoomNotificationMode: MutableState<RoomNotificationMode?>) = launch {
|
||||
defaultRoomNotificationMode.value = notificationSettingsService.getDefaultRoomNotificationMode(
|
||||
room.isEncrypted,
|
||||
room.activeMemberCount
|
||||
room.isOneToOne
|
||||
).getOrThrow()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue