mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
- fix: counter of new tasks was not displayed due to incorrect list ref
This commit is contained in:
parent
7b84cdabf6
commit
dd27362e96
1 changed files with 2 additions and 4 deletions
|
|
@ -2761,12 +2761,12 @@ function newTaskCounter()
|
|||
|
||||
if (Array.isArray(json.lists)) {
|
||||
json.lists.forEach((item) => {
|
||||
counters[0 + item.listId] = 0 + item.counter;
|
||||
counters["" + item.listId] = +item.counter;
|
||||
});
|
||||
}
|
||||
|
||||
tabLists.getAll().forEach( (list) => {
|
||||
if (!list.hidden || list.id !== -1) {
|
||||
if (!list.hidden || list.id != -1) {
|
||||
setNewTaskCounterForList(list.id, counters[list.id]);
|
||||
}
|
||||
});
|
||||
|
|
@ -2776,8 +2776,6 @@ function newTaskCounter()
|
|||
|
||||
function setNewTaskCounterForList(listId, counter)
|
||||
{
|
||||
listId = 0 + listId;
|
||||
counter = 0 + counter;
|
||||
if (counter > 0) {
|
||||
$('#list_' + listId).find('.counter').text(counter).removeClass('hidden');
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue