mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
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:
+24
-3
@@ -36,14 +36,18 @@ class FakeNotificationSettingsService : NotificationSettingsService {
|
||||
override val notificationSettingsChangeFlow: SharedFlow<Unit>
|
||||
get() = _roomNotificationSettingsStateFlow
|
||||
|
||||
override suspend fun getRoomNotificationSettings(roomId: RoomId, isEncrypted: Boolean, membersCount: Long): Result<RoomNotificationSettings> {
|
||||
override suspend fun getRoomNotificationSettings(roomId: RoomId, isEncrypted: Boolean, isOneToOne: Boolean): Result<RoomNotificationSettings> {
|
||||
return getRoomNotificationSettingsResult
|
||||
}
|
||||
|
||||
override suspend fun getDefaultRoomNotificationMode(isEncrypted: Boolean, membersCount: Long): Result<RoomNotificationMode> {
|
||||
override suspend fun getDefaultRoomNotificationMode(isEncrypted: Boolean, isOneToOne: Boolean): Result<RoomNotificationMode> {
|
||||
return getDefaultRoomNotificationMode
|
||||
}
|
||||
|
||||
override suspend fun setDefaultRoomNotificationMode(isEncrypted: Boolean, mode: RoomNotificationMode, isOneToOne: Boolean): Result<Unit> {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override suspend fun setRoomNotificationMode(roomId: RoomId, mode: RoomNotificationMode): Result<Unit> {
|
||||
return setRoomNotificationMode
|
||||
}
|
||||
@@ -56,7 +60,24 @@ class FakeNotificationSettingsService : NotificationSettingsService {
|
||||
return muteRoomResult
|
||||
}
|
||||
|
||||
override suspend fun unmuteRoom(roomId: RoomId, isEncrypted: Boolean, membersCount: Long): Result<Unit> {
|
||||
override suspend fun unmuteRoom(roomId: RoomId, isEncrypted: Boolean, isOneToOne: Boolean): Result<Unit> {
|
||||
return unmuteRoomResult
|
||||
}
|
||||
|
||||
override suspend fun isRoomMentionEnabled(): Result<Boolean> {
|
||||
return Result.success(false)
|
||||
}
|
||||
|
||||
override suspend fun setRoomMentionEnabled(enabled: Boolean): Result<Unit> {
|
||||
return Result.success(Unit)
|
||||
}
|
||||
|
||||
override suspend fun isCallEnabled(): Result<Boolean> {
|
||||
return Result.success(false)
|
||||
}
|
||||
|
||||
override suspend fun setCallEnabled(enabled: Boolean): Result<Unit> {
|
||||
return Result.success(Unit)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user