mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Respect explicit logout when hydrating saved profiles
This commit is contained in:
1 parent
1c5530899a
commit
9827e330e9
2 files changed
+47
-17
No files matched your search
@@ -119,8 +119,13 @@ export default class AuthService {
|
||||
|
||||
hydrateFromStorage() {
|
||||
hydrateProfileCacheFromStorage();
|
||||
const { profiles } = hydrateSavedProfilesFromStorage();
|
||||
if (!getActiveProfilePubkey() && Array.isArray(profiles) && profiles.length) {
|
||||
const { profiles, hasExplicitActiveProfile } = hydrateSavedProfilesFromStorage();
|
||||
if (
|
||||
!getActiveProfilePubkey() &&
|
||||
!hasExplicitActiveProfile &&
|
||||
Array.isArray(profiles) &&
|
||||
profiles.length
|
||||
) {
|
||||
const first = profiles[0]?.pubkey || null;
|
||||
if (first) {
|
||||
setActiveProfilePubkey(first, { persist: true });
|
||||
|
||||
Reference in new issue
Block a user