Typo: isStucked -> isStuck

This commit is contained in:
Benoit Marty 2022-05-12 14:44:10 +02:00 committed by Benoit Marty
parent 8d74acf060
commit 8218d8f267
3 changed files with 5 additions and 5 deletions

View file

@ -207,7 +207,7 @@ interface KeysBackupService {
get() = keysBackupVersion?.version
fun isEnabled(): Boolean
fun isStucked(): Boolean
fun isStuck(): Boolean
fun getState(): KeysBackupState
// For gossiping

View file

@ -139,7 +139,7 @@ internal class DefaultKeysBackupService @Inject constructor(
override fun isEnabled(): Boolean = keysBackupStateManager.isEnabled
override fun isStucked(): Boolean = keysBackupStateManager.isStucked
override fun isStuck(): Boolean = keysBackupStateManager.isStuck
override fun getState(): KeysBackupState = keysBackupStateManager.state
@ -909,7 +909,7 @@ internal class DefaultKeysBackupService @Inject constructor(
*/
fun maybeBackupKeys() {
when {
isStucked() -> {
isStuck() -> {
// 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.
checkAndStartKeysBackup()
@ -1012,7 +1012,7 @@ internal class DefaultKeysBackupService @Inject constructor(
}
override fun checkAndStartKeysBackup() {
if (!isStucked()) {
if (!isStuck()) {
// Try to start or restart the backup only if it is in unknown or bad state
Timber.w("checkAndStartKeysBackup: invalid state: ${getState()}")

View file

@ -49,7 +49,7 @@ internal class KeysBackupStateManager(private val uiHandler: Handler) {
state == KeysBackupState.BackingUp
// True if unknown or bad state
val isStucked: Boolean
val isStuck: Boolean
get() = state == KeysBackupState.Unknown ||
state == KeysBackupState.Disabled ||
state == KeysBackupState.WrongBackUpVersion ||