filter out null prev_feed upon startup
This commit is contained in:
parent
573eaf705f
commit
8a0deeeebd
15
init.js
15
init.js
@ -8,14 +8,15 @@ require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
|
|||||||
const toolbar = document.forms["toolbar-main"];
|
const toolbar = document.forms["toolbar-main"];
|
||||||
const order_by = dijit.getEnclosingWidget(toolbar.order_by);
|
const order_by = dijit.getEnclosingWidget(toolbar.order_by);
|
||||||
const view_mode = dijit.getEnclosingWidget(toolbar.view_mode);
|
const view_mode = dijit.getEnclosingWidget(toolbar.view_mode);
|
||||||
|
|
||||||
prev_prefs = {
|
|
||||||
order_by: order_by.attr("value"),
|
|
||||||
view_mode: view_mode.attr("value"),
|
|
||||||
};
|
|
||||||
prev_key = "ttrss:feedprefs:"+prev_feed;
|
|
||||||
localStorage.setItem(prev_key, JSON.stringify(prev_prefs));
|
|
||||||
|
|
||||||
|
if (this.prev_feed != null) {
|
||||||
|
prev_prefs = {
|
||||||
|
order_by: order_by.attr("value"),
|
||||||
|
view_mode: view_mode.attr("value"),
|
||||||
|
};
|
||||||
|
prev_key = "ttrss:feedprefs:"+this.prev_feed;
|
||||||
|
localStorage.setItem(prev_key, JSON.stringify(this.prev_prefs));
|
||||||
|
}
|
||||||
this.prev_feed = feed[0];
|
this.prev_feed = feed[0];
|
||||||
|
|
||||||
key = "ttrss:feedprefs:"+feed[0];
|
key = "ttrss:feedprefs:"+feed[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user