updated taskList.js
This commit is contained in:
parent
5936575888
commit
2a6aa38563
1 changed files with 6 additions and 2 deletions
|
|
@ -457,7 +457,9 @@ function markTaskDone(username, task) {
|
||||||
task = tasks[username].todos[index].text;
|
task = tasks[username].todos[index].text;
|
||||||
tasks[username].todos[index].done = true;
|
tasks[username].todos[index].done = true;
|
||||||
localStorage.setItem(`tasks`, JSON.stringify(tasks));
|
localStorage.setItem(`tasks`, JSON.stringify(tasks));
|
||||||
|
if (!scrolling) {
|
||||||
renderTaskListToDOM();
|
renderTaskListToDOM();
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
markedTasks: task,
|
markedTasks: task,
|
||||||
failedTasks: "",
|
failedTasks: "",
|
||||||
|
|
@ -548,7 +550,9 @@ function markTaskUndone(username, task) {
|
||||||
|
|
||||||
tasks[username].todos[index].done = false;
|
tasks[username].todos[index].done = false;
|
||||||
localStorage.setItem(`tasks`, JSON.stringify(tasks));
|
localStorage.setItem(`tasks`, JSON.stringify(tasks));
|
||||||
|
if (!scrolling) {
|
||||||
renderTaskListToDOM();
|
renderTaskListToDOM();
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
markedTasks: tasks[username].todos[index].text,
|
markedTasks: tasks[username].todos[index].text,
|
||||||
failedTasks: "",
|
failedTasks: "",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue