mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-15 08:12:28 -06:00
WIP - more decoupling of blocs
This commit is contained in:
@@ -81,7 +81,8 @@ class AuthenticationCubit extends Cubit<AuthenticationState> {
|
||||
appSettings = ApplicationSettingsState.defaultSettings;
|
||||
}
|
||||
if (storedAuth == null || !storedAuth.isValid) {
|
||||
emit(AuthenticationState(isAuthenticated: false, wasLoginStored: false));
|
||||
return emit(
|
||||
AuthenticationState(isAuthenticated: false, wasLoginStored: false));
|
||||
} else {
|
||||
if (appSettings.isLocalAuthenticationEnabled) {
|
||||
final localAuthSuccess = await _localAuthService
|
||||
@@ -103,8 +104,13 @@ class AuthenticationCubit extends Cubit<AuthenticationState> {
|
||||
wasLocalAuthenticationSuccessful: false,
|
||||
));
|
||||
}
|
||||
} else {
|
||||
return emit(AuthenticationState(
|
||||
isAuthenticated: true,
|
||||
authentication: storedAuth,
|
||||
wasLoginStored: true,
|
||||
));
|
||||
}
|
||||
emit(AuthenticationState(isAuthenticated: false, wasLoginStored: true));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user