Is large changes
This commit is contained in:
parent
f1b04a37d3
commit
88ab5a3314
|
|
@ -192,6 +192,7 @@ Middleware<AppState> _createRefreshRequest(AuthRepository repository) {
|
|||
NextDispatcher next) async {
|
||||
final action = dynamicAction as RefreshData;
|
||||
final state = store.state;
|
||||
final company = state.company;
|
||||
|
||||
if (state.isSaving || state.isLoading) {
|
||||
print('Skipping refresh request - pending request');
|
||||
|
|
@ -210,7 +211,7 @@ Middleware<AppState> _createRefreshRequest(AuthRepository repository) {
|
|||
TokenEntity.unobscureToken(prefs.getString(kSharedPrefToken)) ??
|
||||
'TOKEN';
|
||||
|
||||
final updatedAt = action.clearData
|
||||
final updatedAt = action.clearData && !company.isLarge
|
||||
? 0
|
||||
: ((state.userCompanyState.lastUpdated - kMillisecondsToRefreshData) /
|
||||
1000)
|
||||
|
|
@ -226,7 +227,7 @@ Middleware<AppState> _createRefreshRequest(AuthRepository repository) {
|
|||
includeStatic: action.includeStatic || state.staticState.isStale,
|
||||
)
|
||||
.then((data) {
|
||||
if (action.clearData) {
|
||||
if (action.clearData && !company.isLarge) {
|
||||
store.dispatch(ClearData());
|
||||
}
|
||||
store.dispatch(LoadAccountSuccess(
|
||||
|
|
|
|||
|
|
@ -224,7 +224,6 @@ Middleware<AppState> _loadExpenses(ExpenseRepository repository) {
|
|||
store.dispatch(LoadExpensesRequest());
|
||||
repository.loadList(store.state.credentials).then((data) {
|
||||
store.dispatch(LoadExpensesSuccess(data));
|
||||
|
||||
if (action.completer != null) {
|
||||
action.completer.complete(null);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ add_custom_command(
|
|||
${FLUTTER_TOOL_ENVIRONMENT}
|
||||
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
|
||||
windows-x64 $<CONFIG>
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(flutter_assemble DEPENDS
|
||||
"${FLUTTER_LIBRARY}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue