fix(web): refresh recent albums sidebar after album changes (#26757)

This commit is contained in:
Michel Heusschen
2026-03-09 17:11:32 +01:00
committed by GitHub
parent df0c86920d
commit a47b232235
10 changed files with 37 additions and 21 deletions
+7
View File
@@ -22,10 +22,17 @@ const defaultUserInteraction: UserInteractions = {
export const userInteraction = $state<UserInteractions>(defaultUserInteraction);
const resetRecentAlbums = () => {
userInteraction.recentAlbums = undefined;
};
const reset = () => {
Object.assign(userInteraction, defaultUserInteraction);
};
eventManager.on({
AlbumCreate: () => resetRecentAlbums(),
AlbumUpdate: () => resetRecentAlbums(),
AlbumDelete: () => resetRecentAlbums(),
AuthLogout: () => reset(),
});