Merge pull request 'Open the default feed after unsubscribing' (#5) from wn/tt-rss:bugfix/post-unsubscribe-feed-selection into master
Reviewed-on: https://git.tt-rss.org/fox/tt-rss/pulls/5
This commit is contained in:
commit
d0efa35d22
|
@ -312,7 +312,7 @@ const CommonDialogs = {
|
||||||
} else {
|
} else {
|
||||||
if (feed_id == Feeds.getActive())
|
if (feed_id == Feeds.getActive())
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
Feeds.open({feed: -5})
|
Feeds.openDefaultFeed();
|
||||||
},
|
},
|
||||||
100);
|
100);
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
/* global __, App, Headlines, xhrPost, xhr, dojo, dijit, fox, PluginHost, Notify, fox */
|
/* global __, App, Headlines, xhrPost, xhr, dojo, dijit, fox, PluginHost, Notify, fox */
|
||||||
|
|
||||||
const Feeds = {
|
const Feeds = {
|
||||||
|
_default_feed_id: -3,
|
||||||
counters_last_request: 0,
|
counters_last_request: 0,
|
||||||
_active_feed_id: undefined,
|
_active_feed_id: undefined,
|
||||||
_active_feed_is_cat: false,
|
_active_feed_is_cat: false,
|
||||||
|
@ -109,6 +110,9 @@ const Feeds = {
|
||||||
}
|
}
|
||||||
return false; // block unneeded form submits
|
return false; // block unneeded form submits
|
||||||
},
|
},
|
||||||
|
openDefaultFeed: function() {
|
||||||
|
this.open({feed: this._default_feed_id});
|
||||||
|
},
|
||||||
openNextUnread: function() {
|
openNextUnread: function() {
|
||||||
const is_cat = this.activeIsCat();
|
const is_cat = this.activeIsCat();
|
||||||
const nuf = this.getNextUnread(this.getActive(), is_cat);
|
const nuf = this.getNextUnread(this.getActive(), is_cat);
|
||||||
|
@ -215,7 +219,7 @@ const Feeds = {
|
||||||
if (hash_feed_id != undefined) {
|
if (hash_feed_id != undefined) {
|
||||||
this.open({feed: hash_feed_id, is_cat: hash_feed_is_cat});
|
this.open({feed: hash_feed_id, is_cat: hash_feed_is_cat});
|
||||||
} else {
|
} else {
|
||||||
this.open({feed: -3});
|
this.openDefaultFeed();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.hideOrShowFeeds(App.getInitParam("hide_read_feeds"));
|
this.hideOrShowFeeds(App.getInitParam("hide_read_feeds"));
|
||||||
|
|
Loading…
Reference in New Issue