diff --git a/lib/redux/state/setting_state.dart b/lib/redux/state/setting_state.dart index 2fa437c..894cf8d 100644 --- a/lib/redux/state/setting_state.dart +++ b/lib/redux/state/setting_state.dart @@ -17,8 +17,8 @@ class SettingState { return SettingState( mode: payload?.mode ?? SettingModeKassa, tradeType: payload?.tradeType ?? SettingTradeTypeGood, - pinCode: payload.pinCode ?? null, - pinLocked: payload.pinLocked ?? false, + pinCode: payload?.pinCode ?? null, + pinLocked: payload?.pinLocked ?? false, pinSkip: false, ); } diff --git a/lib/views/home/home_view.dart b/lib/views/home/home_view.dart index 4ee7e54..1de534f 100644 --- a/lib/views/home/home_view.dart +++ b/lib/views/home/home_view.dart @@ -93,6 +93,7 @@ class _HomeViewState extends State with WidgetsBindingObserver { _checkLockPin () async { if ( Redux.store.state.settingState.pinLocked == true) { + await Future.delayed(Duration(milliseconds: 200)); Navigator.of(context).push(MaterialPageRoute( builder: (_) => WillPopScope( @@ -108,11 +109,11 @@ class _HomeViewState extends State with WidgetsBindingObserver { @override void initState() { super.initState(); + WidgetsBinding.instance.addObserver(this); selectedTabIndex = 0; pageController = new PageController(initialPage: selectedTabIndex); Redux.store.dispatch(checkSmena); _dataService.checkDbFill(Redux.store.state.userState.user); - WidgetsBinding.instance.addObserver(this); _checkLockPin(); } diff --git a/lib/views/settings/settings_view.dart b/lib/views/settings/settings_view.dart index f7e427e..a4070cc 100644 --- a/lib/views/settings/settings_view.dart +++ b/lib/views/settings/settings_view.dart @@ -53,7 +53,7 @@ class _SettingViewState extends State { return Scaffold( appBar: AppBar( centerTitle: true, - title: Text('Настройка HalykPos'), + title: Text('Настройка приложения'), ), body: SingleChildScrollView( child: Container(