_active_feed_id: set to undefined on startup to prevent unneeded Feed.open() if reloadCurrent is called because of a non-default main toolbar value

This commit is contained in:
Andrew Dolgov 2019-05-07 19:10:11 +03:00
parent d09aad7c80
commit 3bf40f3ba8
1 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
define(["dojo/_base/declare"], function (declare) { define(["dojo/_base/declare"], function (declare) {
Feeds = { Feeds = {
counters_last_request: 0, counters_last_request: 0,
_active_feed_id: 0, _active_feed_id: undefined,
_active_feed_is_cat: false, _active_feed_is_cat: false,
infscroll_in_progress: 0, infscroll_in_progress: 0,
infscroll_disabled: 0, infscroll_disabled: 0,
@ -99,9 +99,9 @@ define(["dojo/_base/declare"], function (declare) {
PluginHost.run(PluginHost.HOOK_COUNTERS_PROCESSED); PluginHost.run(PluginHost.HOOK_COUNTERS_PROCESSED);
}, },
reloadCurrent: function(method) { reloadCurrent: function(method) {
if (this.getActive() != undefined) {
console.log("reloadCurrent: " + method); console.log("reloadCurrent: " + method);
if (this.getActive() != undefined) {
this.open({feed: this.getActive(), is_cat: this.activeIsCat(), method: method}); this.open({feed: this.getActive(), is_cat: this.activeIsCat(), method: method});
} }
return false; // block unneeded form submits return false; // block unneeded form submits