fix: reformat code / code improvements
This commit is contained in:
@@ -56,7 +56,8 @@ class PinLockViewModel extends ChangeNotifier {
|
||||
final settings = await svc.getSettings();
|
||||
_pinRequired = settings.pinRequired;
|
||||
}
|
||||
} catch (_) {
|
||||
} catch (e) {
|
||||
debugPrint('PinLockViewModel: load error: $e');
|
||||
_errorMessage = 'Could not check PIN status.';
|
||||
} finally {
|
||||
_hasLoaded = true;
|
||||
@@ -85,7 +86,8 @@ class PinLockViewModel extends ChangeNotifier {
|
||||
|
||||
notifyListeners();
|
||||
return true;
|
||||
} catch (_) {
|
||||
} catch (e) {
|
||||
debugPrint('PinLockViewModel: setPin error: $e');
|
||||
_errorMessage = 'Could not save PIN.';
|
||||
notifyListeners();
|
||||
return false;
|
||||
@@ -108,7 +110,8 @@ class PinLockViewModel extends ChangeNotifier {
|
||||
_errorMessage = 'Incorrect PIN.';
|
||||
notifyListeners();
|
||||
return false;
|
||||
} catch (_) {
|
||||
} catch (e) {
|
||||
debugPrint('PinLockViewModel: verify error: $e');
|
||||
_errorMessage = 'Could not verify PIN.';
|
||||
notifyListeners();
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user