mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-27 15:28:18 +08:00
Typo: isStucked -> isStuck
This commit is contained in:
parent
8d74acf060
commit
8218d8f267
@ -207,7 +207,7 @@ interface KeysBackupService {
|
|||||||
get() = keysBackupVersion?.version
|
get() = keysBackupVersion?.version
|
||||||
|
|
||||||
fun isEnabled(): Boolean
|
fun isEnabled(): Boolean
|
||||||
fun isStucked(): Boolean
|
fun isStuck(): Boolean
|
||||||
fun getState(): KeysBackupState
|
fun getState(): KeysBackupState
|
||||||
|
|
||||||
// For gossiping
|
// For gossiping
|
||||||
|
@ -139,7 +139,7 @@ internal class DefaultKeysBackupService @Inject constructor(
|
|||||||
|
|
||||||
override fun isEnabled(): Boolean = keysBackupStateManager.isEnabled
|
override fun isEnabled(): Boolean = keysBackupStateManager.isEnabled
|
||||||
|
|
||||||
override fun isStucked(): Boolean = keysBackupStateManager.isStucked
|
override fun isStuck(): Boolean = keysBackupStateManager.isStuck
|
||||||
|
|
||||||
override fun getState(): KeysBackupState = keysBackupStateManager.state
|
override fun getState(): KeysBackupState = keysBackupStateManager.state
|
||||||
|
|
||||||
@ -909,7 +909,7 @@ internal class DefaultKeysBackupService @Inject constructor(
|
|||||||
*/
|
*/
|
||||||
fun maybeBackupKeys() {
|
fun maybeBackupKeys() {
|
||||||
when {
|
when {
|
||||||
isStucked() -> {
|
isStuck() -> {
|
||||||
// If not already done, or in error case, check for a valid backup version on the homeserver.
|
// If not already done, or in error case, check for a valid backup version on the homeserver.
|
||||||
// If there is one, maybeBackupKeys will be called again.
|
// If there is one, maybeBackupKeys will be called again.
|
||||||
checkAndStartKeysBackup()
|
checkAndStartKeysBackup()
|
||||||
@ -1012,7 +1012,7 @@ internal class DefaultKeysBackupService @Inject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun checkAndStartKeysBackup() {
|
override fun checkAndStartKeysBackup() {
|
||||||
if (!isStucked()) {
|
if (!isStuck()) {
|
||||||
// Try to start or restart the backup only if it is in unknown or bad state
|
// Try to start or restart the backup only if it is in unknown or bad state
|
||||||
Timber.w("checkAndStartKeysBackup: invalid state: ${getState()}")
|
Timber.w("checkAndStartKeysBackup: invalid state: ${getState()}")
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ internal class KeysBackupStateManager(private val uiHandler: Handler) {
|
|||||||
state == KeysBackupState.BackingUp
|
state == KeysBackupState.BackingUp
|
||||||
|
|
||||||
// True if unknown or bad state
|
// True if unknown or bad state
|
||||||
val isStucked: Boolean
|
val isStuck: Boolean
|
||||||
get() = state == KeysBackupState.Unknown ||
|
get() = state == KeysBackupState.Unknown ||
|
||||||
state == KeysBackupState.Disabled ||
|
state == KeysBackupState.Disabled ||
|
||||||
state == KeysBackupState.WrongBackUpVersion ||
|
state == KeysBackupState.WrongBackUpVersion ||
|
||||||
|
Loading…
Reference in New Issue
Block a user