* Feeds.openNextUnread: fix
* model.getNextFeed: make sure return values are consistent, stop wrapping back to starred
This commit is contained in:
parent
43744412f4
commit
2e6d48ead7
|
@ -394,7 +394,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "dojo/_base/array", "dojo/co
|
||||||
}
|
}
|
||||||
|
|
||||||
const items = this.model.store._arrayOfAllItems;
|
const items = this.model.store._arrayOfAllItems;
|
||||||
let item = items[0];
|
let item = false;
|
||||||
|
|
||||||
for (let i = 0; i < items.length; i++) {
|
for (let i = 0; i < items.length; i++) {
|
||||||
if (items[i] == treeItem) {
|
if (items[i] == treeItem) {
|
||||||
|
@ -422,7 +422,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "dojo/_base/array", "dojo/co
|
||||||
return [this.model.store.getValue(item, 'bare_id'),
|
return [this.model.store.getValue(item, 'bare_id'),
|
||||||
!this.model.store.getValue(item, 'id').match('FEED:')];
|
!this.model.store.getValue(item, 'id').match('FEED:')];
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return [false, false];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getPreviousFeed: function (feed, is_cat) {
|
getPreviousFeed: function (feed, is_cat) {
|
||||||
|
|
|
@ -133,9 +133,10 @@ const Feeds = {
|
||||||
return Feeds.reloadCurrent('');
|
return Feeds.reloadCurrent('');
|
||||||
},
|
},
|
||||||
openNextUnread: function() {
|
openNextUnread: function() {
|
||||||
const is_cat = this.activeIsCat();
|
const [feed, is_cat] = this.getNextUnread(this.getActive(), this.activeIsCat());
|
||||||
const nuf = this.getNextUnread(this.getActive(), is_cat);
|
|
||||||
if (nuf) this.open({feed: nuf, is_cat: is_cat});
|
if (feed !== false)
|
||||||
|
this.open({feed: feed, is_cat: is_cat});
|
||||||
},
|
},
|
||||||
toggle: function() {
|
toggle: function() {
|
||||||
Element.toggle("feeds-holder");
|
Element.toggle("feeds-holder");
|
||||||
|
|
Loading…
Reference in New Issue