Is large changes
This commit is contained in:
parent
88ab5a3314
commit
c85cc3db97
|
|
@ -296,7 +296,7 @@ Middleware<AppState> _createLoadState(
|
|||
print('Error (app_middleware - refresh): $error');
|
||||
store.dispatch(UserLogout(action.context));
|
||||
});
|
||||
store.dispatch(RefreshData(completer: completer));
|
||||
store.dispatch(RefreshData(completer: completer, clearData: true));
|
||||
} else {
|
||||
store.dispatch(UserLogout(action.context));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -194,14 +194,18 @@ Middleware<AppState> _createRefreshRequest(AuthRepository repository) {
|
|||
final state = store.state;
|
||||
final company = state.company;
|
||||
|
||||
if (state.isSaving || state.isLoading) {
|
||||
print('Skipping refresh request - pending request');
|
||||
next(action);
|
||||
return;
|
||||
} else if (state.company.isLarge && !state.isLoaded) {
|
||||
print('Skipping refresh request - not loaded');
|
||||
next(action);
|
||||
return;
|
||||
if (action.clearData) {
|
||||
//
|
||||
} else {
|
||||
if (state.isSaving || state.isLoading) {
|
||||
print('Skipping refresh request - pending request');
|
||||
next(action);
|
||||
return;
|
||||
} else if (state.company.isLarge && !state.isLoaded) {
|
||||
print('Skipping refresh request - not loaded');
|
||||
next(action);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
|
|
|
|||
Loading…
Reference in New Issue