Implemented better tags form field, persistent grid view setting, fixed hidden items in documents list

This commit is contained in:
Anton Stubenbord
2022-11-15 16:12:35 +01:00
parent 7fac53522a
commit 67ddf90a41
15 changed files with 322 additions and 164 deletions

View File

@@ -84,9 +84,13 @@ class AuthenticationCubit extends Cubit<AuthenticationState> {
Future<void> restoreSessionState() async {
final storedAuth = await localStore.loadAuthenticationInformation();
final appSettings = await localStore.loadApplicationSettings() ??
ApplicationSettingsState.defaultSettings;
late ApplicationSettingsState? appSettings;
try {
appSettings = await localStore.loadApplicationSettings() ??
ApplicationSettingsState.defaultSettings;
} catch (err) {
appSettings = ApplicationSettingsState.defaultSettings;
}
if (storedAuth == null || !storedAuth.isValid) {
emit(AuthenticationState(isAuthenticated: false, wasLoginStored: false));
} else {