Headlines.click: do not set article active if it already is
Headlines.onLoaded: reset active article if not called in append mode
This commit is contained in:
parent
2621180b54
commit
9814ac608c
|
@ -303,11 +303,6 @@ define(["dojo/_base/declare"], function (declare) {
|
||||||
// this is used to quickly switch between feeds, sets active but xhr is on a timeout
|
// this is used to quickly switch between feeds, sets active but xhr is on a timeout
|
||||||
const delayed = params.delayed || false;
|
const delayed = params.delayed || false;
|
||||||
|
|
||||||
if (feed != this.getActive() || this.activeIsCat() != is_cat) {
|
|
||||||
this._search_query = false;
|
|
||||||
Article.setActive(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (offset != 0) {
|
if (offset != 0) {
|
||||||
if (this.infscroll_in_progress)
|
if (this.infscroll_in_progress)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -16,10 +16,12 @@ define(["dojo/_base/declare"], function (declare) {
|
||||||
Article.openInNewWindow(id);
|
Article.openInNewWindow(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Article.getActive() != id) {
|
||||||
Article.setActive(id);
|
Article.setActive(id);
|
||||||
|
|
||||||
if (!App.getInitParam("cdm_expanded"))
|
if (!App.getInitParam("cdm_expanded"))
|
||||||
Article.cdmScrollToId(id);
|
Article.cdmScrollToId(id);
|
||||||
|
}
|
||||||
|
|
||||||
return in_body;
|
return in_body;
|
||||||
|
|
||||||
|
@ -231,6 +233,9 @@ define(["dojo/_base/declare"], function (declare) {
|
||||||
|
|
||||||
if (reply) {
|
if (reply) {
|
||||||
|
|
||||||
|
if (offset == 0)
|
||||||
|
Article.setActive(0);
|
||||||
|
|
||||||
is_cat = reply['headlines']['is_cat'];
|
is_cat = reply['headlines']['is_cat'];
|
||||||
feed_id = reply['headlines']['id'];
|
feed_id = reply['headlines']['id'];
|
||||||
Feeds.last_search_query = reply['headlines']['search_query'];
|
Feeds.last_search_query = reply['headlines']['search_query'];
|
||||||
|
|
Loading…
Reference in New Issue