mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:05:28 +00:00
Make isLastSession "live"
This commit is contained in:
committed by
Benoit Marty
parent
daa90a0660
commit
6ddc2f5814
+3
-8
@@ -31,6 +31,7 @@ class FakeEncryptionService : EncryptionService {
|
||||
override val backupStateStateFlow: MutableStateFlow<BackupState> = MutableStateFlow(BackupState.UNKNOWN)
|
||||
override val recoveryStateStateFlow: MutableStateFlow<RecoveryState> = MutableStateFlow(RecoveryState.UNKNOWN)
|
||||
override val enableRecoveryProgressStateFlow: MutableStateFlow<EnableRecoveryProgress> = MutableStateFlow(EnableRecoveryProgress.Starting)
|
||||
override val isLastDevice: MutableStateFlow<Boolean> = MutableStateFlow(false)
|
||||
private var waitForBackupUploadSteadyStateFlow: Flow<BackupUploadState> = flowOf()
|
||||
|
||||
private var recoverFailure: Exception? = null
|
||||
@@ -73,14 +74,8 @@ class FakeEncryptionService : EncryptionService {
|
||||
return Result.success(Unit)
|
||||
}
|
||||
|
||||
private var isLastDevice = false
|
||||
|
||||
fun givenIsLastDevice(isLastDevice: Boolean) {
|
||||
this.isLastDevice = isLastDevice
|
||||
}
|
||||
|
||||
override suspend fun isLastDevice(): Result<Boolean> = simulateLongTask {
|
||||
return Result.success(isLastDevice)
|
||||
fun emitIsLastDevice(isLastDevice: Boolean) {
|
||||
this.isLastDevice.value = isLastDevice
|
||||
}
|
||||
|
||||
override suspend fun resetRecoveryKey(): Result<String> = simulateLongTask {
|
||||
|
||||
Reference in New Issue
Block a user