Debounce PIN entry to show the last digit before submitting. (#2017)

This commit is contained in:
Doug
2023-11-03 07:31:01 +00:00
committed by GitHub
parent 5ae6494004
commit b10d534c94
9 changed files with 58 additions and 37 deletions
@@ -43,10 +43,6 @@ struct AppLockSetupPINScreen: View {
PINTextField(pinCode: $context.pinCode,
isSecure: context.viewState.mode == .unlock)
.focused($textFieldFocus)
.onChange(of: context.pinCode) { newValue in
guard newValue.count == 4 else { return }
context.send(viewAction: .submitPINCode)
}
}
.padding(.horizontal, 16)
.padding(.top, UIConstants.iconTopPaddingToNavigationBar)