summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-05-06 21:57:58 +0300
committerAndrew Dolgov <[email protected]>2019-05-06 21:57:58 +0300
commit9368f1a07f51b58afe7c4665164b20128d22c7bb (patch)
treefc248640479fc221ffa551e3ececa89c6a4b5092 /js
parent6479c073244b4689c24ddd14febf3bfa7d0d6ed3 (diff)
restore feed from URL hash after feedlist init
Diffstat (limited to 'js')
-rw-r--r--js/Feeds.js11
-rw-r--r--js/tt-rss.js7
2 files changed, 8 insertions, 10 deletions
diff --git a/js/Feeds.js b/js/Feeds.js
index 53f2efd3e..524045eb2 100644
--- a/js/Feeds.js
+++ b/js/Feeds.js
@@ -203,10 +203,13 @@ define(["dojo/_base/declare"], function (declare) {
document.onkeypress = (event) => { return App.hotkeyHandler(event) };
window.onresize = () => { Headlines.scrollHandler(); }
- if (!this.getActive()) {
- this.open({feed: -3});
+ const hash_feed_id = hash_get('f');
+ const hash_feed_is_cat = hash_get('c') == "1";
+
+ if (hash_feed_id != undefined) {
+ this.open({feed: hash_feed_id, is_cat: hash_feed_is_cat});
} else {
- this.open({feed: this.getActive(), is_cat: this.activeIsCat()});
+ this.open({feed: -3});
}
this.hideOrShowFeeds(App.getInitParam("hide_read_feeds") == 1);
@@ -250,6 +253,8 @@ define(["dojo/_base/declare"], function (declare) {
return this._active_feed_id;
},
setActive: function(id, is_cat) {
+ console.log('setActive', id, is_cat);
+
hash_set('f', id);
hash_set('c', is_cat ? 1 : 0);
diff --git a/js/tt-rss.js b/js/tt-rss.js
index bf0434a95..a31404426 100644
--- a/js/tt-rss.js
+++ b/js/tt-rss.js
@@ -148,13 +148,6 @@ require(["dojo/_base/kernel",
dijit.getEnclosingWidget(toolbar.order_by).attr('value',
App.getInitParam("default_view_order_by"));
- const hash_feed_id = hash_get('f');
- const hash_feed_is_cat = hash_get('c') == "1";
-
- if (hash_feed_id != undefined) {
- Feeds.setActive(hash_feed_id, hash_feed_is_cat);
- }
-
App.setLoadingProgress(50);
this._widescreen_mode = App.getInitParam("widescreen");