From e8f2f117343bf43f8e28488479e0afff6372df16 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Fri, 24 May 2024 15:57:42 -0300 Subject: [PATCH] Reduce intesity of Timer.tsx ticks --- src/js/components/SurahStream/Timer.tsx | 6 ++++-- src/js/lib/t.ts | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/js/components/SurahStream/Timer.tsx b/src/js/components/SurahStream/Timer.tsx index 7d6a72f..81b286a 100644 --- a/src/js/components/SurahStream/Timer.tsx +++ b/src/js/components/SurahStream/Timer.tsx @@ -39,7 +39,7 @@ export function Timer({ locale, surah, ayah, isPaused, audioStatus, onComplete } } else if (ms <= 0) { onComplete(surah, ayah); } else { - const tid = setTimeout(() => setMs(ms - 100), 100); + const tid = setTimeout(() => setMs(ms - 1000), 1000); return () => clearTimeout(tid); } }, [isStalled, isPaused, ms]); @@ -50,7 +50,9 @@ export function Timer({ locale, surah, ayah, isPaused, audioStatus, onComplete } return (