mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
feat: add onMany to BaseEventManager (#25492)
Use a map of events instead of array of tuples for better ergonomics.
This commit is contained in:
@@ -6,8 +6,10 @@ class UploadManager {
|
||||
mediaTypes = $state<ServerMediaTypesResponseDto>({ image: [], sidecar: [], video: [] });
|
||||
|
||||
constructor() {
|
||||
eventManager.on('AppInit', () => this.#loadExtensions());
|
||||
eventManager.on('AuthLogout', () => this.reset());
|
||||
eventManager.onMany({
|
||||
AppInit: () => this.#loadExtensions(),
|
||||
AuthLogout: () => this.reset(),
|
||||
});
|
||||
}
|
||||
|
||||
reset() {
|
||||
|
||||
Reference in New Issue
Block a user