File tree 1 file changed +2
-9
lines changed
src/talk/renderer/TalkWrapper
1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import { registerTalkDesktopSettingsSection } from '../Settings/index.ts'
10
10
import { subscribeBroadcast } from '../../../shared/broadcast.service.ts'
11
11
import { appData } from '../../../app/AppData.js'
12
12
import { subscribe } from '@nextcloud/event-bus'
13
- import { EVENTS } from '@talk/src/constants.ts'
14
13
15
14
const emit = defineEmits<{
16
15
(event: 'ready'): void
@@ -36,14 +35,8 @@ onMounted(async () => {
36
35
appData.setTalkHashDirty(true).persist()
37
36
})
38
37
39
- subscribe(EVENTS.UNREAD_COUNT_UPDATED, (eventData) => {
40
- // Process unread counter values
41
- const { totalUnreadMessages, totalUnreadMentions, totalUnreadMentionsDirect } = eventData
42
-
43
- if (window.TALK_DESKTOP) {
44
- const badgeCount = totalUnreadMessages
45
- window.TALK_DESKTOP.setBadgeCount(badgeCount)
46
- }
38
+ subscribe('talk:unread:updated', ( eventData ) => {
39
+ window.TALK_DESKTOP.setBadgeCount(eventData.messages)
47
40
})
48
41
49
42
// Ready
You can’t perform that action at this time.
0 commit comments