diff --git a/lib/redux/invoice/invoice_middleware.dart b/lib/redux/invoice/invoice_middleware.dart index 840b89745..aa2db9caf 100644 --- a/lib/redux/invoice/invoice_middleware.dart +++ b/lib/redux/invoice/invoice_middleware.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:invoiceninja_flutter/data/models/models.dart'; import 'package:invoiceninja_flutter/redux/app/app_actions.dart'; import 'package:invoiceninja_flutter/redux/invoice/invoice_actions.dart'; +import 'package:invoiceninja_flutter/redux/payment/payment_actions.dart'; import 'package:invoiceninja_flutter/redux/recurring_invoice/recurring_invoice_actions.dart'; import 'package:invoiceninja_flutter/redux/ui/ui_actions.dart'; import 'package:invoiceninja_flutter/ui/invoice/invoice_email_vm.dart'; @@ -431,7 +432,7 @@ Middleware _loadInvoices(InvoiceRepository repository) { if (action.completer != null) { action.completer.complete(null); } - store.dispatch(LoadRecurringInvoices()); + store.dispatch(LoadPayments()); }).catchError((Object error) { print(error); store.dispatch(LoadInvoicesFailure(error)); diff --git a/lib/redux/payment/payment_middleware.dart b/lib/redux/payment/payment_middleware.dart index 77ea41f7f..7240f0639 100644 --- a/lib/redux/payment/payment_middleware.dart +++ b/lib/redux/payment/payment_middleware.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:invoiceninja_flutter/redux/app/app_actions.dart'; import 'package:invoiceninja_flutter/redux/quote/quote_actions.dart'; +import 'package:invoiceninja_flutter/redux/recurring_invoice/recurring_invoice_actions.dart'; import 'package:invoiceninja_flutter/ui/payment/refund/payment_refund_vm.dart'; import 'package:invoiceninja_flutter/utils/platforms.dart'; import 'package:redux/redux.dart'; @@ -300,7 +301,7 @@ Middleware _loadPayments(PaymentRepository repository) { if (action.completer != null) { action.completer.complete(null); } - store.dispatch(LoadQuotes()); + store.dispatch(LoadRecurringInvoices()); }).catchError((Object error) { print(error); store.dispatch(LoadPaymentsFailure(error)); diff --git a/lib/redux/recurring_invoice/recurring_invoice_middleware.dart b/lib/redux/recurring_invoice/recurring_invoice_middleware.dart index 7d8b1e166..26660dae0 100644 --- a/lib/redux/recurring_invoice/recurring_invoice_middleware.dart +++ b/lib/redux/recurring_invoice/recurring_invoice_middleware.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:invoiceninja_flutter/redux/payment/payment_actions.dart'; +import 'package:invoiceninja_flutter/redux/quote/quote_actions.dart'; import 'package:invoiceninja_flutter/ui/recurring_invoice/recurring_invoice_pdf_vm.dart'; import 'package:redux/redux.dart'; import 'package:invoiceninja_flutter/redux/app/app_actions.dart'; @@ -308,7 +309,7 @@ Middleware _loadRecurringInvoices( if (action.completer != null) { action.completer.complete(null); } - store.dispatch(LoadPayments()); + store.dispatch(LoadQuotes()); }).catchError((Object error) { print(error); store.dispatch(LoadRecurringInvoicesFailure(error));