This commit is contained in:
Hillel Coren 2018-12-24 16:57:49 +02:00
parent f00e137016
commit d4349dfdd2
3 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:invoiceninja_flutter/redux/dashboard/dashboard_actions.dart'; import 'package:invoiceninja_flutter/redux/dashboard/dashboard_actions.dart';
import 'package:invoiceninja_flutter/redux/task/task_actions.dart';
import 'package:redux/redux.dart'; import 'package:redux/redux.dart';
import 'package:invoiceninja_flutter/data/models/models.dart'; import 'package:invoiceninja_flutter/data/models/models.dart';
import 'package:invoiceninja_flutter/redux/product/product_actions.dart'; import 'package:invoiceninja_flutter/redux/product/product_actions.dart';
@ -223,8 +224,8 @@ Middleware<AppState> _loadProjects(ProjectRepository repository) {
if (action.completer != null) { if (action.completer != null) {
action.completer.complete(null); action.completer.complete(null);
} }
if (state.productState.isStale) { if (state.taskState.isStale) {
store.dispatch(LoadProducts()); store.dispatch(LoadTasks());
} }
}).catchError((Object error) { }).catchError((Object error) {
print(error); print(error);

View File

@ -310,8 +310,8 @@ Middleware<AppState> _loadQuotes(QuoteRepository repository) {
if (action.completer != null) { if (action.completer != null) {
action.completer.complete(null); action.completer.complete(null);
} }
if (state.dashboardState.isStale) { if (state.projectState.isStale) {
store.dispatch(LoadDashboard()); store.dispatch(LoadProjects());
} }
}).catchError((Object error) { }).catchError((Object error) {
print(error); print(error);

View File

@ -216,9 +216,11 @@ Middleware<AppState> _loadStubs(StubRepository repository) {
if (action.completer != null) { if (action.completer != null) {
action.completer.complete(null); action.completer.complete(null);
} }
/*
if (state.productState.isStale) { if (state.productState.isStale) {
store.dispatch(LoadProducts()); store.dispatch(LoadProducts());
} }
*/
}).catchError((Object error) { }).catchError((Object error) {
print(error); print(error);
store.dispatch(LoadStubsFailure(error)); store.dispatch(LoadStubsFailure(error));