Update Riot/Modules/SetPinCode/EnterPinCode/EnterPinCodeViewModel.swift

Co-authored-by: SBiOSoftWhare <SBiOSoftWhare@users.noreply.github.com>
This commit is contained in:
Gil Eluard
2021-01-08 14:46:43 +01:00
committed by GitHub
parent e2c51e6aa1
commit cb62670a60

View File

@@ -138,9 +138,9 @@ final class EnterPinCodeViewModel: EnterPinCodeViewModelType {
if initialPin.isEmpty && currentPin != pinCodePreferences.pin {
// no match
updateAfterUnlockFailed()
} else {
} else if initialPin.isEmpty {
// match or already unlocked
if initialPin.isEmpty {
// the user can choose a new Pin code
initialPin = currentPin
currentPin.removeAll()
@@ -149,7 +149,6 @@ final class EnterPinCodeViewModel: EnterPinCodeViewModelType {
// choosing pin
updateAfterPinSet()
}
}
default:
break
}