mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 15:25:46 +00:00
fix(home): refresh Mainstage when active server changes (#291)
Adds activeServerId to the Home useEffect dependencies so a server switch triggered while the user is already on the Mainstage refetches albums/artists instead of leaving stale covers (which broke against the new server's cover URLs). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
cecc59aead
commit
048d7249a4
@@ -16,6 +16,7 @@ const HOME_DISCOVER_SLICE = 20;
|
||||
|
||||
export default function Home() {
|
||||
const homeSections = useHomeStore(s => s.sections);
|
||||
const activeServerId = useAuthStore(s => s.activeServerId);
|
||||
const musicLibraryFilterVersion = useAuthStore(s => s.musicLibraryFilterVersion);
|
||||
const mixMinRatingFilterEnabled = useAuthStore(s => s.mixMinRatingFilterEnabled);
|
||||
const mixMinRatingAlbum = useAuthStore(s => s.mixMinRatingAlbum);
|
||||
@@ -70,6 +71,7 @@ export default function Home() {
|
||||
})();
|
||||
return () => { cancelled = true; };
|
||||
}, [
|
||||
activeServerId,
|
||||
musicLibraryFilterVersion,
|
||||
homeSections,
|
||||
mixMinRatingFilterEnabled,
|
||||
|
||||
Reference in New Issue
Block a user