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:
David Langley 2023-09-12 01:11:13 +01:00
parent e64f0bd7d9
commit a0ac324e3f
27 changed files with 924 additions and 59 deletions

View file

@ -22,5 +22,6 @@ android {
}
dependencies {
implementation(libs.coroutines.core)
implementation(projects.libraries.matrix.api)
}

View file

@ -15,6 +15,8 @@
*/
package io.element.android.libraries.pushstore.api
import kotlinx.coroutines.flow.Flow
/**
* Store data related to push about a user.
@ -25,7 +27,7 @@ interface UserPushStore {
suspend fun getCurrentRegisteredPushKey(): String?
suspend fun setCurrentRegisteredPushKey(value: String)
suspend fun areNotificationEnabledForDevice(): Boolean
fun getNotificationEnabledForDevice(): Flow<Boolean>
suspend fun setNotificationEnabledForDevice(enabled: Boolean)
/**