mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Merge branch 'develop' into julioromano/poll_history_entry_point
This commit is contained in:
+1
@@ -41,4 +41,5 @@ interface NotificationSettingsService {
|
||||
suspend fun isInviteForMeEnabled(): Result<Boolean>
|
||||
suspend fun setInviteForMeEnabled(enabled: Boolean): Result<Unit>
|
||||
suspend fun getRoomsWithUserDefinedRules(): Result<List<String>>
|
||||
suspend fun canHomeServerPushEncryptedEventsToDevice(): Result<Boolean>
|
||||
}
|
||||
|
||||
+5
@@ -140,4 +140,9 @@ class RustNotificationSettingsService(
|
||||
runCatching {
|
||||
notificationSettings.getRoomsWithUserDefinedRules(enabled = true)
|
||||
}
|
||||
|
||||
override suspend fun canHomeServerPushEncryptedEventsToDevice(): Result<Boolean> =
|
||||
runCatching {
|
||||
notificationSettings.canHomeserverPushEncryptedEventToDevice()
|
||||
}
|
||||
}
|
||||
|
||||
+9
@@ -47,6 +47,7 @@ class FakeNotificationSettingsService(
|
||||
private var restoreDefaultNotificationModeError: Throwable? = null
|
||||
private var setDefaultNotificationModeError: Throwable? = null
|
||||
private var setAtRoomError: Throwable? = null
|
||||
private var canHomeServerPushEncryptedEventsToDeviceResult = Result.success(true)
|
||||
override val notificationSettingsChangeFlow: SharedFlow<Unit>
|
||||
get() = _notificationSettingsStateFlow
|
||||
|
||||
@@ -163,6 +164,10 @@ class FakeNotificationSettingsService(
|
||||
return Result.success(if (roomNotificationModeIsDefault) listOf() else listOf(A_ROOM_ID.value))
|
||||
}
|
||||
|
||||
override suspend fun canHomeServerPushEncryptedEventsToDevice(): Result<Boolean> {
|
||||
return canHomeServerPushEncryptedEventsToDeviceResult
|
||||
}
|
||||
|
||||
fun givenSetNotificationModeError(throwable: Throwable?) {
|
||||
setNotificationModeError = throwable
|
||||
}
|
||||
@@ -178,4 +183,8 @@ class FakeNotificationSettingsService(
|
||||
fun givenSetDefaultNotificationModeError(throwable: Throwable?) {
|
||||
setDefaultNotificationModeError = throwable
|
||||
}
|
||||
|
||||
fun givenCanHomeServerPushEncryptedEventsToDeviceResult(result: Result<Boolean>) {
|
||||
canHomeServerPushEncryptedEventsToDeviceResult = result
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user