diff options
author | wn_ <[email protected]> | 2021-02-20 13:44:42 +0000 |
---|---|---|
committer | wn_ <[email protected]> | 2021-02-21 12:48:15 +0000 |
commit | 1bd5152c8016c6019a647bf995d29d81c6b731ed (patch) | |
tree | 49fd7e0e7184dee17bb59ab9b57ec47743c28b3f | |
parent | d1328321bebadcf8a530d3c05f52a8f3c58bb969 (diff) |
Open the default feed after unsubscribing.
Previously the UI appeared to hang, even though the backend request had already completed successfully.
-rw-r--r-- | js/CommonDialogs.js | 2 | ||||
-rw-r--r-- | js/Feeds.js | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/js/CommonDialogs.js b/js/CommonDialogs.js index 704e797d3..a100a546d 100644 --- a/js/CommonDialogs.js +++ b/js/CommonDialogs.js @@ -312,7 +312,7 @@ const CommonDialogs = { } else { if (feed_id == Feeds.getActive()) setTimeout(() => { - Feeds.open({feed: -5}) + Feeds.openDefaultFeed(); }, 100); diff --git a/js/Feeds.js b/js/Feeds.js index e9ac5328d..4841fd0df 100644 --- a/js/Feeds.js +++ b/js/Feeds.js @@ -3,6 +3,7 @@ /* global __, App, Headlines, xhrPost, xhr, dojo, dijit, fox, PluginHost, Notify, fox */ const Feeds = { + _default_feed_id: -3, counters_last_request: 0, _active_feed_id: undefined, _active_feed_is_cat: false, @@ -109,6 +110,9 @@ const Feeds = { } return false; // block unneeded form submits }, + openDefaultFeed: function() { + this.open({feed: this._default_feed_id}); + }, openNextUnread: function() { const is_cat = this.activeIsCat(); const nuf = this.getNextUnread(this.getActive(), is_cat); @@ -215,7 +219,7 @@ const Feeds = { if (hash_feed_id != undefined) { this.open({feed: hash_feed_id, is_cat: hash_feed_is_cat}); } else { - this.open({feed: -3}); + this.openDefaultFeed(); } this.hideOrShowFeeds(App.getInitParam("hide_read_feeds")); |