Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed Apr 11, 2024
2 parents 37a0c33 + 8752775 commit ec7b46e
Show file tree
Hide file tree
Showing 13 changed files with 81 additions and 108 deletions.
4 changes: 2 additions & 2 deletions lib/main_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_redux/flutter_redux.dart';
import 'package:flutter_styled_toast/flutter_styled_toast.dart';
import 'package:intl/intl.dart';
import 'package:invoiceninja_flutter/ui/app/important_message_banner.dart';
import 'package:invoiceninja_flutter/ui/app/window_manager.dart';
import 'package:invoiceninja_flutter/ui/bank_account/edit/bank_account_edit_vm.dart';
import 'package:invoiceninja_flutter/ui/purchase_order/purchase_order_email_vm.dart';
Expand All @@ -28,7 +29,6 @@ import 'package:invoiceninja_flutter/redux/app/app_state.dart';
import 'package:invoiceninja_flutter/redux/company/company_selectors.dart';
import 'package:invoiceninja_flutter/redux/ui/pref_state.dart';
import 'package:invoiceninja_flutter/ui/app/app_builder.dart';
import 'package:invoiceninja_flutter/ui/app/change_layout_banner.dart';
import 'package:invoiceninja_flutter/ui/app/main_screen.dart';
import 'package:invoiceninja_flutter/ui/app/screen_imports.dart';
import 'package:invoiceninja_flutter/ui/app/web_session_timeout.dart';
Expand Down Expand Up @@ -500,7 +500,7 @@ class InvoiceNinjaAppState extends State<InvoiceNinjaApp> {
LoginScreen.route: (context) => LoginScreen(),
MainScreen.route: (context) => MainScreen(),
DashboardScreenBuilder.route: (context) =>
ChangeLayoutBanner(
ImportantMessageBanner(
suggestedLayout: AppLayout.mobile,
appLayout: state.prefState.appLayout,
child: DashboardScreenBuilder(),
Expand Down
4 changes: 2 additions & 2 deletions lib/redux/app/app_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ class UpdateLastHistory implements PersistUI {
final int page;
}

class DismissNativeWarning implements PersistUI {}
class DismissFlutterWebWarning implements PersistUI {}

class DismissNativeWarningPermanently implements PersistUI, PersistPrefs {}
class DismissFlutterWebWarningPermanently implements PersistUI, PersistPrefs {}

class DismissGatewayWarningPermanently implements PersistUI, PersistPrefs {}

Expand Down
10 changes: 5 additions & 5 deletions lib/redux/app/app_reducer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ AppState appReducer(AppState state, dynamic action) {
return state.rebuild((b) => b
..isLoading = loadingReducer(state.isLoading, action)
..isSaving = savingReducer(state.isSaving, action)
..dismissedNativeWarning =
dismissedNativeWarningReducer(state.dismissedNativeWarning, action)
..dismissedFlutterWebWarning = dismissedFlutterWebWarningReducer(
state.dismissedFlutterWebWarning, action)
..lastError = lastErrorReducer(state.lastError, action)
..authState.replace(authReducer(state.authState, action))
..staticState.replace(staticReducer(state.staticState, action))
Expand Down Expand Up @@ -166,11 +166,11 @@ final lastErrorReducer = combineReducers<String>([
}),
]);

final dismissedNativeWarningReducer = combineReducers<bool>([
TypedReducer<bool, DismissNativeWarning>((state, action) {
final dismissedFlutterWebWarningReducer = combineReducers<bool>([
TypedReducer<bool, DismissFlutterWebWarning>((state, action) {
return true;
}),
TypedReducer<bool, DismissNativeWarningPermanently>((state, action) {
TypedReducer<bool, DismissFlutterWebWarningPermanently>((state, action) {
return true;
}),
]);
4 changes: 2 additions & 2 deletions lib/redux/app/app_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {
isSaving: false,
isTesting: false,
isWhiteLabeled: isWhiteLabeled,
dismissedNativeWarning: false,
dismissedFlutterWebWarning: false,
lastError: '',
authState: AuthState(
url: url,
Expand Down Expand Up @@ -126,7 +126,7 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {

bool get isWhiteLabeled;

bool get dismissedNativeWarning;
bool get dismissedFlutterWebWarning;

String get lastError;

Expand Down
34 changes: 17 additions & 17 deletions lib/redux/app/app_state.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions lib/redux/ui/pref_reducer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ PrefState prefReducer(
..menuSidebarMode = manuSidebarReducer(state.menuSidebarMode, action)
..historySidebarMode =
historySidebarReducer(state.historySidebarMode, action)
..hideDesktopWarning =
hideDesktopWarningReducer(state.hideDesktopWarning, action)
..hideFlutterWebWarning =
hideFlutterWebWarningReducer(state.hideFlutterWebWarning, action)
..hideTaskExtensionBanner =
hideTaskExtensionBannerReducer(state.hideTaskExtensionBanner, action)
..hideGatewayWarning =
Expand Down Expand Up @@ -256,8 +256,8 @@ Reducer<String> filterReducer = combineReducers([
]);
*/

Reducer<bool> hideDesktopWarningReducer = combineReducers([
TypedReducer<bool, DismissNativeWarningPermanently>((filter, action) {
Reducer<bool> hideFlutterWebWarningReducer = combineReducers([
TypedReducer<bool, DismissFlutterWebWarningPermanently>((filter, action) {
return true;
}),
]);
Expand Down
6 changes: 3 additions & 3 deletions lib/redux/ui/pref_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ abstract class PrefState implements Built<PrefState, PrefStateBuilder> {
textScaleFactor: 1,
longPressSelectionIsDefault: true,
tapSelectedToEdit: false,
hideDesktopWarning: false,
hideFlutterWebWarning: false,
hideGatewayWarning: false,
hideReviewApp: false,
hideOneYearReviewApp: false,
Expand Down Expand Up @@ -158,7 +158,7 @@ abstract class PrefState implements Built<PrefState, PrefStateBuilder> {

String get darkColorTheme;

bool get hideDesktopWarning;
bool get hideFlutterWebWarning;

bool get hideGatewayWarning;

Expand Down Expand Up @@ -269,7 +269,7 @@ abstract class PrefState implements Built<PrefState, PrefStateBuilder> {
..showKanban = false
..isPreviewVisible = false
..isFilterVisible = false
..hideDesktopWarning = false
..hideFlutterWebWarning = false
..hideGatewayWarning = false
..hideReviewApp = false
..hideOneYearReviewApp = false
Expand Down
32 changes: 16 additions & 16 deletions lib/redux/ui/pref_state.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ec7b46e

Please sign in to comment.