FeedStoreModel.getFeedUnread: return -1 when value is unset
This commit is contained in:
parent
9368f1a07f
commit
2ce31fd0bf
|
@ -31,7 +31,7 @@ define(["dojo/_base/declare", "dijit/tree/ForestStoreModel"], function (declare)
|
|||
},
|
||||
getFeedUnread: function (feed, is_cat) {
|
||||
const unread = parseInt(this.getFeedValue(feed, is_cat, 'unread'));
|
||||
return (isNaN(unread)) ? 0 : unread;
|
||||
return (isNaN(unread)) ? -1 : unread;
|
||||
},
|
||||
setFeedUnread: function (feed, is_cat, unread) {
|
||||
return this.setFeedValue(feed, is_cat, 'unread', parseInt(unread));
|
||||
|
|
Loading…
Reference in New Issue