only auto-enter pins of length 4 or more

This commit is contained in:
sneurlax 2024-07-01 10:23:33 -05:00
parent 603824a21c
commit f836136ef0
2 changed files with 2 additions and 2 deletions

View file

@ -223,7 +223,7 @@ class _LockscreenViewState extends ConsumerState<LockscreenView> {
final storedPin = await _secureStore.read(key: 'stack_pin');
final autoPin = ref.read(prefsChangeNotifierProvider).autoPin;
if (autoPin && enteredPin == storedPin) {
if (enteredPin.length >= 4 && autoPin && enteredPin == storedPin) {
await Future<void>.delayed(
const Duration(milliseconds: 200),
);

View file

@ -86,7 +86,7 @@ class _ChangePinViewState extends ConsumerState<ChangePinView> {
final storedPin = await _secureStore.read(key: 'stack_pin');
final autoPin = ref.read(prefsChangeNotifierProvider).autoPin;
if (autoPin && enteredPin == storedPin) {
if (enteredPin.length >= 4 && autoPin && enteredPin == storedPin) {
await _pageController.nextPage(
duration: const Duration(milliseconds: 300),
curve: Curves.linear,