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