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
e64f0bd7d9
commit
a0ac324e3f
27 changed files with 924 additions and 59 deletions
|
|
@ -35,6 +35,7 @@ import io.element.android.libraries.pushstore.api.clientsecret.PushClientSecret
|
|||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.SupervisorJob
|
||||
import kotlinx.coroutines.flow.first
|
||||
import kotlinx.coroutines.launch
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
|
@ -123,7 +124,7 @@ class DefaultPushHandler @Inject constructor(
|
|||
}
|
||||
|
||||
val userPushStore = userPushStoreFactory.create(userId)
|
||||
if (!userPushStore.areNotificationEnabledForDevice()) {
|
||||
if (!userPushStore.getNotificationEnabledForDevice().first()) {
|
||||
// TODO We need to check if this is an incoming call
|
||||
Timber.tag(loggerTag.value).i("Notification are disabled for this device, ignore push.")
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue