mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-11-10 17:02:22 +01:00
DOn't double detch unreads
This commit is contained in:
1 parent
727ac913de
commit
1f1c0faccc
1 file changed
+1
-1
@@ -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