Skip to content

Commit

Permalink
Update block.js
Browse files Browse the repository at this point in the history
Remove pushBydate function to take into account real filter
  • Loading branch information
JeremyOWO authored and AuthenticEshkinKot committed Feb 14, 2021
1 parent a46e175 commit 06a5d65
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions Taskodrome/files/scripts/block/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function Block(name, /** @type {ColumnHandler} */columnHandler, /** @type {Page}
var columnIndex = columnHandler.getColumnIndexByCard(card);
if (columnIndex != -1) {
++m_cardCount;
pushByDate(columnIndex, card);
m_columns[columnIndex].push(card);
m_blockGr.incCounter(columnIndex);
}
return columnIndex;
Expand Down Expand Up @@ -281,18 +281,4 @@ function Block(name, /** @type {ColumnHandler} */columnHandler, /** @type {Page}
this.toBeDrawn = function() {
return (m_cardCount != 0) || m_showIfEmpty;
};

function pushByDate(columnIndex, card) {
var column = m_columns[columnIndex];
var i = 0;
var done = false;
while (i != column.length && !done) {
if (column[i].getUpdateTime() > card.getUpdateTime()) {
++i;
} else {
done = true;
}
}
column.splice(i, 0, card);
};
};
};

0 comments on commit 06a5d65

Please sign in to comment.