diff --git a/lib/redux/app/app_middleware.dart b/lib/redux/app/app_middleware.dart index a7b586418..206f73b51 100644 --- a/lib/redux/app/app_middleware.dart +++ b/lib/redux/app/app_middleware.dart @@ -383,7 +383,7 @@ Middleware _createUserLoggedIn( uiRepository.saveUIState(state.uiState); staticRepository.saveStaticState(state.staticState); - if (state.prefState.persistData) { + if (state.prefState.persistData || state.company.isSmall) { for (var i = 0; i < state.userCompanyStates.length; i++) { companyRepositories[i].saveCompanyState(state.userCompanyStates[i]); } @@ -403,7 +403,7 @@ Middleware _createPersistData( final index = state.uiState.selectedCompanyIndex; final companyState = state.userCompanyStates[index]; - if (state.prefState.persistData) { + if (state.prefState.persistData || state.company.isSmall) { companyRepositories[index].saveCompanyState(companyState); } }; diff --git a/lib/redux/ui/pref_state.dart b/lib/redux/ui/pref_state.dart index b018f5f94..fd45ec50b 100644 --- a/lib/redux/ui/pref_state.dart +++ b/lib/redux/ui/pref_state.dart @@ -27,7 +27,7 @@ abstract class PrefState implements Built { showFilterSidebar: false, longPressSelectionIsDefault: true, showKanban: false, - persistData: true, + persistData: !kIsWeb, companyPrefs: BuiltMap(), sortFields: BuiltMap(), customColors: BuiltMap(), @@ -166,7 +166,7 @@ abstract class PrefState implements Built { : BuiltMap(PrefState.CONTRAST_COLORS)) ..showKanban = false ..isPreviewEnabled = true - ..persistData = true + ..persistData = !kIsWeb ..colorTheme = builder.enableDarkMode == true ? kColorThemeLight : kColorThemeLight;