From 7746e310513b674b2c20534bb0c532e5514f4b94 Mon Sep 17 00:00:00 2001 From: Jure <44338+hoornet@users.noreply.github.com> Date: Fri, 13 Mar 2026 10:59:29 +0100 Subject: [PATCH] Navigate to feed and refresh after login with new account --- src/stores/user.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/stores/user.ts b/src/stores/user.ts index 2c37dd3..918c0b7 100644 --- a/src/stores/user.ts +++ b/src/stores/user.ts @@ -7,6 +7,7 @@ import { useMuteStore } from "./mute"; import { useLightningStore } from "./lightning"; import { useUIStore } from "./ui"; import { useNotificationsStore } from "./notifications"; +import { useFeedStore } from "./feed"; export interface SavedAccount { pubkey: string; @@ -121,6 +122,10 @@ export const useUserStore = create((set, get) => ({ get().fetchFollows(); useMuteStore.getState().fetchMuteList(pubkey); useNotificationsStore.getState().fetchNotifications(pubkey); + + // Navigate to feed and refresh so the new account's content loads + useUIStore.getState().setView("feed"); + useFeedStore.getState().loadFeed(); } catch (err) { set({ loginError: `Login failed: ${err}` }); } @@ -160,6 +165,9 @@ export const useUserStore = create((set, get) => ({ get().fetchFollows(); useMuteStore.getState().fetchMuteList(pubkey); useNotificationsStore.getState().fetchNotifications(pubkey); + + useUIStore.getState().setView("feed"); + useFeedStore.getState().loadFeed(); } catch (err) { set({ loginError: `Login failed: ${err}` }); }