Headlines.click: open original article (and mark as read) on alt click on title

This commit is contained in:
Andrew Dolgov 2019-03-07 15:40:02 +03:00
parent b54c40c45b
commit 900cdbbb31
1 changed files with 14 additions and 4 deletions

View File

@ -168,7 +168,12 @@ define(["dojo/_base/declare"], function (declare) {
} else { } else {
if (App.isCombinedMode()) { if (App.isCombinedMode()) {
if (Article.getActive() != id) { if (event.altKey && !in_body) {
Article.openInNewWindow(id);
Headlines.toggleUnread(id, 0);
} else if (Article.getActive() != id) {
Headlines.select('none'); Headlines.select('none');
Article.setActive(id); Article.setActive(id);
@ -184,14 +189,19 @@ define(["dojo/_base/declare"], function (declare) {
} else if (in_body) { } else if (in_body) {
Headlines.toggleUnread(id, 0); Headlines.toggleUnread(id, 0);
} else { } else { /* !in body */
Article.openInNewWindow(id); Article.openInNewWindow(id);
} }
return in_body; return in_body;
} else { } else {
Headlines.select('none'); if (event.altKey) {
Article.view(id); Article.openInNewWindow(id);
Headlines.toggleUnread(id, 0);
} else {
Headlines.select('none');
Article.view(id);
}
} }
} }