From b0ad867e6b603d9a06e1d9175878473484fcad5f Mon Sep 17 00:00:00 2001 From: liyunze <50455574+liyunze-coding@users.noreply.github.com> Date: Fri, 11 Aug 2023 20:21:30 +0800 Subject: [PATCH] Update taskList.js - fixed overlap issue - fixed scrolling issue --- scripts/taskList.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/taskList.js b/scripts/taskList.js index 266c929..f8087a2 100644 --- a/scripts/taskList.js +++ b/scripts/taskList.js @@ -609,6 +609,11 @@ function clearAllExceptStreamer(streamer) { } function renderTaskListToDOM() { + if (scrolling) { + checkToAnimate(); + return; + } + const tasks = JSON.parse(localStorage.tasks); const taskContainers = document.querySelectorAll(".task-container"); @@ -751,9 +756,10 @@ async function checkToAnimate() { await sleep(scrollingSpeed); scrolling = false; + renderTaskListToDOM(); checkToAnimate(); } - } else if (scrolling) { + } else if (!scrolling) { document.querySelector(".secondary").style.display = "none"; // cancel animations