diff --git a/ts/components/leftpane/ActionsPanel.tsx b/ts/components/leftpane/ActionsPanel.tsx index 1d6021434..4a67bc81b 100644 --- a/ts/components/leftpane/ActionsPanel.tsx +++ b/ts/components/leftpane/ActionsPanel.tsx @@ -244,13 +244,13 @@ export const ActionsPanel = () => { // Reuse the unreadToShow from the global state to update the badge count useThrottleFn( - () => { + (unreadCount: number) => { if (globalUnreadMessageCount !== undefined) { - ipcRenderer.send('update-badge-count', globalUnreadMessageCount); + ipcRenderer.send('update-badge-count', unreadCount); } }, 2000, - [] + [globalUnreadMessageCount] ); useInterval(cleanUpOldDecryptedMedias, startCleanUpMedia ? cleanUpMediasInterval : null);