fix: comments were kinda ass
This commit is contained in:
@@ -33,7 +33,6 @@ class _AppBootstrapState extends State<AppBootstrap> {
|
||||
|
||||
DefaultExportService(database: database).uploadToServer();
|
||||
|
||||
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
|
||||
});
|
||||
}
|
||||
|
||||
+29
-27
@@ -57,8 +57,8 @@ bool _mustBeOnLock(PinLockViewModel pinLockViewModel) {
|
||||
!pinLockViewModel.isPinSet && pinLockViewModel.pinRequired;
|
||||
final isLocked =
|
||||
pinLockViewModel.isPinSet &&
|
||||
!pinLockViewModel.isUnlocked &&
|
||||
pinLockViewModel.pinRequired;
|
||||
!pinLockViewModel.isUnlocked &&
|
||||
pinLockViewModel.pinRequired;
|
||||
|
||||
return needsPinSetup || isLocked;
|
||||
}
|
||||
@@ -81,47 +81,49 @@ bool _isDebugShortcutArea(String location) {
|
||||
location.startsWith('/history/');
|
||||
}
|
||||
|
||||
GoRouter createAppRouter(
|
||||
PinLockViewModel pinLockViewModel, {
|
||||
GoRouter createAppRouter(PinLockViewModel pinLockViewModel, {
|
||||
required AdminPinViewModel adminPinViewModel,
|
||||
}) {
|
||||
return GoRouter(
|
||||
initialLocation: '/bar',
|
||||
observers: [routeObserver, SentryNavigatorObserver()],
|
||||
refreshListenable: Listenable.merge([pinLockViewModel, adminPinViewModel]),
|
||||
redirect: (_, state) => _redirectApp(
|
||||
pinLockViewModel: pinLockViewModel,
|
||||
adminPinViewModel: adminPinViewModel,
|
||||
state: state,
|
||||
),
|
||||
redirect: (_, state) =>
|
||||
_redirectApp(
|
||||
pinLockViewModel: pinLockViewModel,
|
||||
adminPinViewModel: adminPinViewModel,
|
||||
state: state,
|
||||
),
|
||||
routes: [
|
||||
GoRoute(path: '/', redirect: (context, state) => '/bar'),
|
||||
GoRoute(
|
||||
path: '/lock',
|
||||
builder: (context, state) => PinEntryView(
|
||||
mode: pinLockViewModel.isPinSet
|
||||
? PinEntryMode.unlock
|
||||
: PinEntryMode.create,
|
||||
onSuccess: () {
|
||||
context.go("/bar");
|
||||
},
|
||||
),
|
||||
builder: (context, state) =>
|
||||
PinEntryView(
|
||||
mode: pinLockViewModel.isPinSet
|
||||
? PinEntryMode.unlock
|
||||
: PinEntryMode.create,
|
||||
onSuccess: () {
|
||||
context.go("/bar");
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
GoRoute(path: '/bar', builder: (context, state) => const BarScreenView()),
|
||||
|
||||
GoRoute(
|
||||
path: '/admin/lock',
|
||||
builder: (context, state) => PinEntryView(
|
||||
mode: adminPinViewModel.isPinSet
|
||||
? PinEntryMode.unlock
|
||||
: PinEntryMode.create,
|
||||
isAdmin: true,
|
||||
onVerify: adminPinViewModel.verify,
|
||||
onSet: adminPinViewModel.setPin,
|
||||
errorMessage: () => adminPinViewModel.errorMessage,
|
||||
onSuccess: () => context.go('/admin'),
|
||||
),
|
||||
builder: (context, state) =>
|
||||
PinEntryView(
|
||||
mode: adminPinViewModel.isPinSet
|
||||
? PinEntryMode.unlock
|
||||
: PinEntryMode.create,
|
||||
isAdmin: true,
|
||||
onVerify: adminPinViewModel.verify,
|
||||
onSet: adminPinViewModel.setPin,
|
||||
errorMessage: () => adminPinViewModel.errorMessage,
|
||||
onSuccess: () => context.go('/admin'),
|
||||
),
|
||||
),
|
||||
|
||||
GoRoute(
|
||||
|
||||
Reference in New Issue
Block a user