1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 17:05:56 +00:00

remove model.getNextUnreadFeed; unify code with feedTree.getNextFeed

This commit is contained in:
Andrew Dolgov
2021-03-19 14:06:23 +03:00
parent 43ea36d030
commit 718c9f07fa
3 changed files with 9 additions and 44 deletions

View File

@@ -381,7 +381,10 @@ define(["dojo/_base/declare", "dojo/dom-construct", "dojo/_base/array", "dojo/co
}
},
getNextFeed: function (feed, is_cat) {
getNextUnread: function(feed, is_cat) {
return this.getNextFeed(feed, is_cat, true);
},
getNextFeed: function (feed, is_cat, unread_only = false) {
let treeItem;
if (is_cat) {
@@ -399,8 +402,9 @@ define(["dojo/_base/declare", "dojo/dom-construct", "dojo/_base/array", "dojo/co
for (let j = i+1; j < items.length; j++) {
const id = String(items[j].id);
const box = this._itemNodesMap[id];
const unread = parseInt(items[j].unread);
if (box) {
if (box && (!unread_only || unread > 0)) {
const row = box[0].rowNode;
const cat = box[0].rowNode.parentNode.parentNode;