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');
|
print('Error (app_middleware - refresh): $error');
|
||||||
store.dispatch(UserLogout(action.context));
|
store.dispatch(UserLogout(action.context));
|
||||||
});
|
});
|
||||||
store.dispatch(RefreshData(completer: completer));
|
store.dispatch(RefreshData(completer: completer, clearData: true));
|
||||||
} else {
|
} else {
|
||||||
store.dispatch(UserLogout(action.context));
|
store.dispatch(UserLogout(action.context));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -194,6 +194,9 @@ Middleware<AppState> _createRefreshRequest(AuthRepository repository) {
|
||||||
final state = store.state;
|
final state = store.state;
|
||||||
final company = state.company;
|
final company = state.company;
|
||||||
|
|
||||||
|
if (action.clearData) {
|
||||||
|
//
|
||||||
|
} else {
|
||||||
if (state.isSaving || state.isLoading) {
|
if (state.isSaving || state.isLoading) {
|
||||||
print('Skipping refresh request - pending request');
|
print('Skipping refresh request - pending request');
|
||||||
next(action);
|
next(action);
|
||||||
|
|
@ -203,6 +206,7 @@ Middleware<AppState> _createRefreshRequest(AuthRepository repository) {
|
||||||
next(action);
|
next(action);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
final url =
|
final url =
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue