diff --git a/src/lib/components/notes/note-list.svelte b/src/lib/components/notes/note-list.svelte index e5458f3..6f2e95a 100644 --- a/src/lib/components/notes/note-list.svelte +++ b/src/lib/components/notes/note-list.svelte @@ -11,13 +11,15 @@ const paddingRows = 2; let scrollHeight = 0; let scrollOffset = 0; - let flipDuration = 0; let notesOffset = 0; let notesLimit = 100; let prevNotesCount = 0; let prevRowHeight = 0; + let flipDuration = 0; + let flipTimeout: ReturnType | undefined; + const { noteScale } = settings; let scaleUnsubscribe: Unsubscriber; let countUnsubscribe: Unsubscriber; @@ -41,7 +43,8 @@ if (notesCount !== prevNotesCount) { flipDuration = 300; - setTimeout(() => { + clearTimeout(flipTimeout); + flipTimeout = setTimeout(() => { flipDuration = 0; }, 300); }