We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f258533 + c45b8c2 commit ae600b7Copy full SHA for ae600b7
adminforth/spa/src/stores/core.ts
@@ -92,6 +92,7 @@ export const useCoreStore = defineStore('core', () => {
92
93
// console.log('🔔 subscribeToMenuBadges', mi.badge, JSON.stringify(mi));
94
if (mi.badge !== undefined) {
95
+ websocket.unsubscribe(`/opentopic/update-menu-badge/${mi.itemId}`);
96
websocket.subscribe(`/opentopic/update-menu-badge/${mi.itemId}`, ({ badge }) => {
97
mi.badge = badge;
98
});
@@ -121,8 +122,6 @@ export const useCoreStore = defineStore('core', () => {
121
122
item.badge = badge;
123
}
124
- // TODO: This thing was created for something. Find out why
125
- // websocket.unsubscribeAll();
126
subscribeToMenuBadges();
127
128
0 commit comments