mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Make LinkNewDeviceScreen fall back to the App Lock PIN code when there's no passcode. (#5794)
* Fall back to the AppLock PIN code when there's no passcode. * Add extra tests on the LinkNewDeviceFlowCoordinator. * Misc tweaks for clarification. * Regenerate snapshots.
This commit is contained in:
@@ -13,9 +13,21 @@ enum AppLockScreenViewModelAction {
|
||||
case appUnlocked
|
||||
/// The user failed to unlock the app (or forgot their PIN).
|
||||
case forceLogout
|
||||
/// The user cancelled device owner verification. Only sent in the `.verifyDeviceOwner` mode.
|
||||
case cancelVerifyDeviceOwner
|
||||
}
|
||||
|
||||
enum AppLockScreenMode {
|
||||
/// Unlocking the app on launch/foregrounding.
|
||||
case appUnlock
|
||||
/// Verifying that the user is the device owner to gate a sensitive action.
|
||||
case verifyDeviceOwner
|
||||
}
|
||||
|
||||
struct AppLockScreenViewState: BindableState {
|
||||
/// The context in which the screen is being shown.
|
||||
var mode: AppLockScreenMode = .appUnlock
|
||||
|
||||
/// The number of attempts allowed to unlock the app.
|
||||
let maximumAttempts = 3
|
||||
|
||||
@@ -64,4 +76,6 @@ enum AppLockScreenViewAction {
|
||||
case clearPINCode
|
||||
/// The user didn't heed the warnings and can't remember their PIN.
|
||||
case forgotPIN
|
||||
/// The user cancelled device owner verification.
|
||||
case cancelVerifyDeviceOwner
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user