diff --git a/lib/redux/actions/user_actions.dart b/lib/redux/actions/user_actions.dart index e6414f2..8a2f375 100644 --- a/lib/redux/actions/user_actions.dart +++ b/lib/redux/actions/user_actions.dart @@ -36,7 +36,7 @@ Future checkUserAction(Store store) async { Response session = await _api.isActive(token); isAuthenticated = "OK" == session.body.message; } else { - await Future.delayed(Duration(milliseconds: 100)); + await Future.delayed(Duration(milliseconds: 2000)); } store.dispatch( SetUserStateAction( diff --git a/lib/redux/state/setting_state.dart b/lib/redux/state/setting_state.dart index 33797bd..dd5bb1a 100644 --- a/lib/redux/state/setting_state.dart +++ b/lib/redux/state/setting_state.dart @@ -11,7 +11,7 @@ class SettingState { //read hive factory SettingState.initial(SettingState payload) { return SettingState( - mode: payload?.mode ?? SettingModeCalc, + mode: payload?.mode ?? SettingModeKassa, tradeType: payload?.tradeType ?? SettingTradeTypeGood); } diff --git a/lib/views/login/login_view.dart b/lib/views/login/login_view.dart index 8c14fe8..f87035f 100644 --- a/lib/views/login/login_view.dart +++ b/lib/views/login/login_view.dart @@ -117,7 +117,7 @@ class LoginView extends StatelessWidget { if (result.type == ResultType.Barcode && result.rawContent?.length == 60) { Redux.store.dispatch(authenticateToken(result.rawContent)); - } else { + } else if (result.type == ResultType.Error ) { _dialogService.showDialog(description: 'Не верный формат QR кода'); } } on PlatformException catch (e) {