updated taskList.js
This commit is contained in:
parent
b0ad867e6b
commit
c52d2e8ff8
1 changed files with 4 additions and 9 deletions
|
|
@ -210,7 +210,7 @@ function addTask(username, userColor, task) {
|
||||||
tasks[username].todos.push({ text: t, done: false });
|
tasks[username].todos.push({ text: t, done: false });
|
||||||
}
|
}
|
||||||
localStorage.setItem(`tasks`, JSON.stringify(tasks));
|
localStorage.setItem(`tasks`, JSON.stringify(tasks));
|
||||||
renderTaskListToDOM();
|
checkToAnimate();
|
||||||
return {
|
return {
|
||||||
task: tasksToAdd.join('", "'),
|
task: tasksToAdd.join('", "'),
|
||||||
tasksFailedToAdd: tasksFailedToAdd.join('", "') || "",
|
tasksFailedToAdd: tasksFailedToAdd.join('", "') || "",
|
||||||
|
|
@ -219,7 +219,7 @@ function addTask(username, userColor, task) {
|
||||||
|
|
||||||
tasks[username].todos.push({ text: task, done: false });
|
tasks[username].todos.push({ text: task, done: false });
|
||||||
localStorage.setItem(`tasks`, JSON.stringify(tasks));
|
localStorage.setItem(`tasks`, JSON.stringify(tasks));
|
||||||
renderTaskListToDOM();
|
checkToAnimate();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
task: task,
|
task: task,
|
||||||
|
|
@ -565,7 +565,6 @@ function clearUserTasks(username) {
|
||||||
tasks[username].todos = [];
|
tasks[username].todos = [];
|
||||||
|
|
||||||
localStorage.setItem(`tasks`, JSON.stringify(tasks));
|
localStorage.setItem(`tasks`, JSON.stringify(tasks));
|
||||||
renderTaskListToDOM();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearAllDoneTasks() {
|
function clearAllDoneTasks() {
|
||||||
|
|
@ -609,11 +608,6 @@ function clearAllExceptStreamer(streamer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderTaskListToDOM() {
|
function renderTaskListToDOM() {
|
||||||
if (scrolling) {
|
|
||||||
checkToAnimate();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const tasks = JSON.parse(localStorage.tasks);
|
const tasks = JSON.parse(localStorage.tasks);
|
||||||
|
|
||||||
const taskContainers = document.querySelectorAll(".task-container");
|
const taskContainers = document.querySelectorAll(".task-container");
|
||||||
|
|
@ -776,7 +770,8 @@ function cancelAnimation() {
|
||||||
}
|
}
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
setupDB();
|
resetDB();
|
||||||
|
tests1();
|
||||||
importStyles();
|
importStyles();
|
||||||
renderTaskListToDOM();
|
renderTaskListToDOM();
|
||||||
})();
|
})();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue