fix(mobile) not possible to sign out when option is enable (#860)

This commit is contained in:
Alex 2022-10-24 14:45:58 -05:00 committed by GitHub
parent e63d165b65
commit a87c1c1210
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -164,6 +164,20 @@ class AuthenticationNotifier extends StateNotifier<AuthenticationState> {
_assetCacheService.invalidate();
_albumCacheService.invalidate();
_sharedAlbumCacheService.invalidate();
// Remove login info from local storage
var loginInfo =
Hive.box<HiveSavedLoginInfo>(hiveLoginInfoBox).get(savedLoginInfoKey);
if (loginInfo != null) {
loginInfo.email = "";
loginInfo.password = "";
loginInfo.isSaveLogin = false;
Hive.box<HiveSavedLoginInfo>(hiveLoginInfoBox).put(
savedLoginInfoKey,
loginInfo,
);
}
return true;
}