refactor: event manager (#25481)

* refactor: event manager

* fix: broken downloadFile endpoint
This commit is contained in:
Jason Rasmussen
2026-01-23 18:02:23 -05:00
committed by GitHub
parent b52e8cd570
commit 4fedae4150
16 changed files with 45 additions and 116 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ class MemoryStoreSvelte {
constructor() {
eventManager.on('AuthLogout', () => this.clearCache());
eventManager.on('AuthUserLoaded', () => void this.initialize());
eventManager.on('AuthUserLoaded', () => this.initialize());
}
ready() {
@@ -1,5 +1,4 @@
import { eventManager } from '$lib/managers/event-manager.svelte';
import { handlePromiseError } from '$lib/utils';
import { handleError } from '$lib/utils/handle-error';
import { getNotifications, updateNotification, updateNotifications, type NotificationDto } from '@immich/sdk';
import { t } from 'svelte-i18n';
@@ -9,7 +8,7 @@ class NotificationStore {
notifications = $state<NotificationDto[]>([]);
constructor() {
eventManager.on('AuthLogin', () => handlePromiseError(this.refresh()));
eventManager.on('AuthLogin', () => this.refresh());
eventManager.on('AuthLogout', () => this.clear());
}