Respect explicit logout when hydrating saved profiles

This commit is contained in:
thePR0M3TH3AN committed 2025-10-19 18:52:56 -04:00
1 parent 1c5530899a
commit 9827e330e9
2 files changed
+47 -17

No files matched your search

+7 -2
View File
@@ -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 });