Skip to content

Commit

Permalink
fix: adds in globalUnreadMessageCount into the dependency array for u…
Browse files Browse the repository at this point in the history
…seThrottleFn
  • Loading branch information
burtonemily committed Nov 8, 2024
1 parent df3ac5d commit 81fbf35
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ts/components/leftpane/ActionsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 81fbf35

Please sign in to comment.