Headlines.click: open original article when it makes sense to do so

This commit is contained in:
Andrew Dolgov 2019-03-07 11:52:10 +03:00
parent cf6f867feb
commit 84cf95fe8f
1 changed files with 7 additions and 1 deletions

View File

@ -171,11 +171,17 @@ define(["dojo/_base/declare"], function (declare) {
if (Article.getActive() != id) {
Article.setActive(id);
if (!App.getInitParam("cdm_expanded"))
if (App.getInitParam("cdm_expanded")) {
Article.openInNewWindow(id);
Headlines.toggleUnread(id, 0);
} else {
Article.cdmScrollToId(id);
}
} else if (in_body) {
Headlines.toggleUnread(id, 0);
} else {
Article.openInNewWindow(id);
}
return in_body;