summaryrefslogtreecommitdiff
path: root/js/Feeds.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-03-08 10:43:49 +0300
committerAndrew Dolgov <[email protected]>2021-03-08 10:43:49 +0300
commit1fb7125f90b3d11aecf83da58ef513ff8902a84a (patch)
tree362b394cd7b95bcd153ef3ba38017662027aa1d8 /js/Feeds.js
parent5db6939dc9628886391bcaa18965de94727c96d9 (diff)
minor cleanup related to toolbar-main (use dijit methods, etc)
Diffstat (limited to 'js/Feeds.js')
-rw-r--r--js/Feeds.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/js/Feeds.js b/js/Feeds.js
index ad2edf8d5..2d475bcb6 100644
--- a/js/Feeds.js
+++ b/js/Feeds.js
@@ -117,15 +117,21 @@ const Feeds = {
},
reloadCurrent: function(method) {
if (this.getActive() != undefined) {
- console.log("reloadCurrent: " + method);
+ console.log("reloadCurrent", this.getActive(), this.activeIsCat(), method);
this.open({feed: this.getActive(), is_cat: this.activeIsCat(), method: method});
}
- return false; // block unneeded form submits
},
openDefaultFeed: function() {
this.open({feed: this._default_feed_id});
},
+ onViewModeChanged: function() {
+ // TODO: is this still needed?
+ App.find("body").setAttribute("view-mode",
+ dijit.byId("toolbar-main").getValues().view_mode);
+
+ return Feeds.reloadCurrent('');
+ },
openNextUnread: function() {
const is_cat = this.activeIsCat();
const nuf = this.getNextUnread(this.getActive(), is_cat);
@@ -369,10 +375,7 @@ const Feeds = {
}, 10 * 1000);
}
- //Form.enable("toolbar-main");
-
- let query = Object.assign({op: "feeds", method: "view", feed: feed},
- dojo.formToObject("toolbar-main"));
+ let query = {...{op: "feeds", method: "view", feed: feed}, ...dojo.formToObject("toolbar-main")};
if (method) query.m = method;