From 3a094342d3cffa783036d0d6ed40360b318464c2 Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Tue, 17 Dec 2024 14:04:25 +0000 Subject: [PATCH] filter --- src/reactions/useReactionsReader.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/reactions/useReactionsReader.ts b/src/reactions/useReactionsReader.ts index 70a3deb5..24874d64 100644 --- a/src/reactions/useReactionsReader.ts +++ b/src/reactions/useReactionsReader.ts @@ -47,12 +47,13 @@ export default function useReactionsReader(rtcSession: MatrixRTCSession): { ); reactionsSubject$.current - .pipe(delay(REACTION_ACTIVE_TIME_MS)) + .pipe(delay(REACTION_ACTIVE_TIME_MS + 50)) .subscribe((reactions) => { const date = new Date(); const nextEntries = Object.fromEntries( Object.entries(reactions).filter(([_, hr]) => hr.expireAfter < date), ); + console.log("Filtering", nextEntries); if (Object.keys(reactions).length === Object.keys(nextEntries).length) { return; }