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