diff --git a/packages/notifications/src/notification-manager.ts b/packages/notifications/src/notification-manager.ts index 30b8535753..3bf4c1f735 100644 --- a/packages/notifications/src/notification-manager.ts +++ b/packages/notifications/src/notification-manager.ts @@ -28,7 +28,7 @@ export const notificationManagerMaker = ({ } const config = configManagerMaker({storage: configStorage}) - const {events, unreadCounterByGroup$, notification$} = eventsManagerMaker({ + const {events, unreadCounterByGroup$} = eventsManagerMaker({ storage: eventsStorage, config, display, @@ -51,7 +51,6 @@ export const notificationManagerMaker = ({ events, config, unreadCounterByGroup$, - notification$, } } @@ -83,12 +82,10 @@ const eventsManagerMaker = ({ unreadCounterByGroup$: BehaviorSubject< Readonly> > - notification$: Subject } => { const unreadCounterByGroup$ = new BehaviorSubject< Map >(buildUnreadCounterDefaultValue()) - const notification$ = new Subject() const updateUnreadCounter = async () => { const allEvents = await events.read() @@ -131,7 +128,6 @@ const eventsManagerMaker = ({ await storage.setItem('events', [...allEvents, event]) if (!event.isRead) { await updateUnreadCounter() - notification$.next(event) display(event) } }, @@ -140,7 +136,7 @@ const eventsManagerMaker = ({ unreadCounterByGroup$.next(buildUnreadCounterDefaultValue()) }, } - return {events, unreadCounterByGroup$, notification$} + return {events, unreadCounterByGroup$} } const configManagerMaker = ({ diff --git a/packages/types/src/notifications/manager.ts b/packages/types/src/notifications/manager.ts index 35611d0632..8c7a8bf100 100644 --- a/packages/types/src/notifications/manager.ts +++ b/packages/types/src/notifications/manager.ts @@ -72,7 +72,6 @@ export type NotificationManager = { unreadCounterByGroup$: BehaviorSubject< Readonly> > - notification$: Subject // Events represent a notification event that was trigger by a config rule events: {