diff --git a/lib/redux/recurring_expense/recurring_expense_middleware.dart b/lib/redux/recurring_expense/recurring_expense_middleware.dart index 1f8f98b40..19610d90f 100644 --- a/lib/redux/recurring_expense/recurring_expense_middleware.dart +++ b/lib/redux/recurring_expense/recurring_expense_middleware.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:invoiceninja_flutter/redux/transaction/transaction_actions.dart'; -import 'package:invoiceninja_flutter/utils/platforms.dart'; // Package imports: import 'package:redux/redux.dart'; @@ -253,11 +252,8 @@ Middleware _loadRecurringExpenses( if (action.completer != null) { action.completer.complete(null); } - if (supportsBankAccounts()) { - store.dispatch(LoadTransactions()); - } else { - store.dispatch(PersistData()); - } + + store.dispatch(LoadTransactions()); }).catchError((Object error) { print(error); store.dispatch(LoadRecurringExpensesFailure(error)); diff --git a/lib/ui/app/menu_drawer.dart b/lib/ui/app/menu_drawer.dart index 69c0cd2b6..f0d142864 100644 --- a/lib/ui/app/menu_drawer.dart +++ b/lib/ui/app/menu_drawer.dart @@ -654,13 +654,12 @@ class _MenuDrawerState extends State { icon: getEntityIcon(EntityType.recurringExpense), title: localization.recurringExpenses, ), - if (supportsBankAccounts()) - DrawerTile( - company: company, - entityType: EntityType.transaction, - icon: getEntityIcon(EntityType.transaction), - title: localization.transactions, - ), + DrawerTile( + company: company, + entityType: EntityType.transaction, + icon: getEntityIcon(EntityType.transaction), + title: localization.transactions, + ), if (!isApple() || state.isProPlan) DrawerTile( company: company, diff --git a/lib/ui/settings/settings_list.dart b/lib/ui/settings/settings_list.dart index f2efbb7fa..fa2fa26b6 100644 --- a/lib/ui/settings/settings_list.dart +++ b/lib/ui/settings/settings_list.dart @@ -204,7 +204,7 @@ class _SettingsListState extends State { section: kSettingsTemplatesAndReminders, viewModel: widget.viewModel, ), - if (showAll && supportsBankAccounts()) + if (showAll) SettingsListTile( section: kSettingsBankAccounts, viewModel: widget.viewModel, @@ -574,12 +574,11 @@ class SettingsSearch extends StatelessWidget { 'late_fees', ] ], - if (supportsBankAccounts()) - kSettingsBankAccounts: [ - [ - 'bank_accounts', - ], + kSettingsBankAccounts: [ + [ + 'bank_accounts', ], + ], kSettingsGroupSettings: [ [ 'groups', diff --git a/lib/utils/platforms.dart b/lib/utils/platforms.dart index 5a2c7b8e6..a218df8a4 100644 --- a/lib/utils/platforms.dart +++ b/lib/utils/platforms.dart @@ -31,20 +31,6 @@ bool supportsAppleOAuth() => kIsWeb || isApple(); // TODO remove this function bool supportsMicrosoftOAuth() => kIsWeb; -// TODO remove this function -bool supportsBankAccounts() { - if (!kReleaseMode) { - return true; - } - - final store = StoreProvider.of(navigatorKey.currentContext); - if (store.state.isSelfHosted) { - return true; - } - - return false; -} - bool supportsInAppPurchase() { final store = StoreProvider.of(navigatorKey.currentContext); if (store.state.isSelfHosted) {