mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 14:07:59 -06:00
feat: Finish login switch account feature
This commit is contained in:
@@ -203,10 +203,9 @@ class AuthenticationCubit extends Cubit<AuthenticationState> {
|
||||
Future<void> logout() async {
|
||||
await _resetExternalState();
|
||||
final globalSettings = Hive.box<GlobalSettings>(HiveBoxes.globalSettings).getValue()!;
|
||||
globalSettings.currentLoggedInUser = null;
|
||||
await globalSettings.save();
|
||||
emit(const AuthenticationState.unauthenticated());
|
||||
globalSettings
|
||||
..currentLoggedInUser = null
|
||||
..save();
|
||||
}
|
||||
|
||||
Future<void> _resetExternalState() async {
|
||||
|
||||
Reference in New Issue
Block a user