mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix(web): refresh recent albums sidebar after album changes (#26757)
This commit is contained in:
@@ -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(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user