mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-05-05 21:13:08 +02:00
DOn't double detch unreads
This commit is contained in:
@@ -69,7 +69,7 @@ export function useUnreadCounts(
|
||||
const prev = prevLens.current;
|
||||
prevLens.current = { channels: channelsLen, contacts: contactsLen };
|
||||
// Skip the initial load (0→N); only refetch on mid-session count changes
|
||||
if (prev.channels === 0 && prev.contacts === 0) return;
|
||||
if (prev.channels === 0 || prev.contacts === 0) return;
|
||||
fetchUnreads();
|
||||
}, [channelsLen, contactsLen, fetchUnreads]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user