LockScreen : reduce delay before validation step in setup
This commit is contained in:
parent
43d4f96a9f
commit
a5e098dd1f
1 changed files with 6 additions and 2 deletions
|
|
@ -32,6 +32,11 @@ import io.element.android.libraries.core.meta.BuildMeta
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Some time for the ui to refresh before showing confirmation step.
|
||||||
|
*/
|
||||||
|
private const val DELAY_BEFORE_CONFIRMATION_STEP_IN_MILLIS = 100L
|
||||||
|
|
||||||
class SetupPinPresenter @Inject constructor(
|
class SetupPinPresenter @Inject constructor(
|
||||||
private val lockScreenConfig: LockScreenConfig,
|
private val lockScreenConfig: LockScreenConfig,
|
||||||
private val pinValidator: PinValidator,
|
private val pinValidator: PinValidator,
|
||||||
|
|
@ -60,8 +65,7 @@ class SetupPinPresenter @Inject constructor(
|
||||||
setupPinFailure = pinValidationResult.failure
|
setupPinFailure = pinValidationResult.failure
|
||||||
}
|
}
|
||||||
PinValidator.Result.Valid -> {
|
PinValidator.Result.Valid -> {
|
||||||
// Leave some time for the ui to refresh before showing confirmation
|
delay(DELAY_BEFORE_CONFIRMATION_STEP_IN_MILLIS)
|
||||||
delay(150)
|
|
||||||
isConfirmationStep = true
|
isConfirmationStep = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue