mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
refactor: event manager (#25481)
* refactor: event manager * fix: broken downloadFile endpoint
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user