From b8f14d6d7bf16b67c119841b25c05a89a4ca0d05 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 24 Sep 2019 19:09:11 +0300 Subject: [PATCH] Hide project, tasks, vendors and expenses --- lib/redux/quote/quote_middleware.dart | 7 +++++++ lib/ui/app/app_drawer.dart | 6 ++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/redux/quote/quote_middleware.dart b/lib/redux/quote/quote_middleware.dart index 2a94ccbae..1e693ff3d 100644 --- a/lib/redux/quote/quote_middleware.dart +++ b/lib/redux/quote/quote_middleware.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:invoiceninja_flutter/data/models/models.dart'; import 'package:invoiceninja_flutter/redux/app/app_middleware.dart'; +import 'package:invoiceninja_flutter/redux/dashboard/dashboard_actions.dart'; import 'package:invoiceninja_flutter/redux/project/project_actions.dart'; import 'package:invoiceninja_flutter/redux/quote/quote_actions.dart'; import 'package:invoiceninja_flutter/redux/ui/ui_actions.dart'; @@ -342,9 +343,15 @@ Middleware _loadQuotes(QuoteRepository repository) { if (action.completer != null) { action.completer.complete(null); } + // TODO update once supported + if (state.dashboardState.isStale) { + store.dispatch(LoadDashboard()); + } + /* if (state.projectState.isStale) { store.dispatch(LoadProjects()); } + */ }).catchError((Object error) { print(error); store.dispatch(LoadQuotesFailure(error)); diff --git a/lib/ui/app/app_drawer.dart b/lib/ui/app/app_drawer.dart index 4444a31ab..f9fb39421 100644 --- a/lib/ui/app/app_drawer.dart +++ b/lib/ui/app/app_drawer.dart @@ -21,10 +21,6 @@ import 'package:invoiceninja_flutter/utils/icons.dart'; import 'package:invoiceninja_flutter/utils/localization.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:invoiceninja_flutter/utils/platforms.dart'; -import 'package:invoiceninja_flutter/redux/expense/expense_actions.dart'; -import 'package:invoiceninja_flutter/redux/vendor/vendor_actions.dart'; -import 'package:invoiceninja_flutter/redux/task/task_actions.dart'; -import 'package:invoiceninja_flutter/redux/project/project_actions.dart'; import 'package:invoiceninja_flutter/redux/payment/payment_actions.dart'; import 'package:invoiceninja_flutter/redux/quote/quote_actions.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -252,6 +248,7 @@ class AppDrawer extends StatelessWidget { context: context)); }, ), + /* DrawerTile( company: company, entityType: EntityType.project, @@ -316,6 +313,7 @@ class AppDrawer extends StatelessWidget { context: context)); }, ), + */ // STARTER: menu - do not remove comment DrawerTile( company: company,