fix: adds in globalUnreadMessageCount into the dependency array for useThrottleFn

pull/3216/head
wafflesvsfrankie 6 months ago
parent df3ac5d0fa
commit 81fbf35a32

@ -244,13 +244,13 @@ export const ActionsPanel = () => {
// Reuse the unreadToShow from the global state to update the badge count // Reuse the unreadToShow from the global state to update the badge count
useThrottleFn( useThrottleFn(
() => { (unreadCount: number) => {
if (globalUnreadMessageCount !== undefined) { if (globalUnreadMessageCount !== undefined) {
ipcRenderer.send('update-badge-count', globalUnreadMessageCount); ipcRenderer.send('update-badge-count', unreadCount);
} }
}, },
2000, 2000,
[] [globalUnreadMessageCount]
); );
useInterval(cleanUpOldDecryptedMedias, startCleanUpMedia ? cleanUpMediasInterval : null); useInterval(cleanUpOldDecryptedMedias, startCleanUpMedia ? cleanUpMediasInterval : null);

Loading…
Cancel
Save