summaryrefslogtreecommitdiff
path: root/js/Article.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-10 19:51:20 +0300
committerAndrew Dolgov <[email protected]>2018-12-10 19:51:20 +0300
commit6616c7cf67dcd76cd670ec2d4ffaeaf34ff254b8 (patch)
tree7e8f20220acd5ab6e9b619e30cef17f5cafa11b9 /js/Article.js
parentf96cdb7d5d79f60885cdebc94497c0618f5fe4a5 (diff)
keep track of selected prompt and floating title status using headline row mutation observer
Diffstat (limited to 'js/Article.js')
-rw-r--r--js/Article.js26
1 files changed, 4 insertions, 22 deletions
diff --git a/js/Article.js b/js/Article.js
index 235865394..b70088353 100644
--- a/js/Article.js
+++ b/js/Article.js
@@ -97,6 +97,8 @@ define(["dojo/_base/declare"], function (declare) {
if (dijit.byId("content-insert"))
dijit.byId("headlines-wrap-inner").removeChild(
dijit.byId("content-insert"));
+
+ Article.setActive(0);
},
displayUrl: function (id) {
const query = {op: "rpc", method: "getlinktitlebyid", id: id};
@@ -300,7 +302,7 @@ define(["dojo/_base/declare"], function (declare) {
Headlines.catchupBatched(() => {
Feeds.decrementFeedCounter(Feeds.getActive(), Feeds.activeIsCat());
Headlines.toggleUnread(id, 0);
- Headlines.updateFloatingTitle(true);
+ //Headlines.updateFloatingTitle(true);
});
}
@@ -315,7 +317,7 @@ define(["dojo/_base/declare"], function (declare) {
PluginHost.run(PluginHost.HOOK_ARTICLE_SET_ACTIVE, this._active_article_id);
}
- Headlines.updateSelectedPrompt();
+ //Headlines.updateSelectedPrompt();
},
getActive: function () {
return this._active_article_id;
@@ -334,26 +336,6 @@ define(["dojo/_base/declare"], function (declare) {
}
},
- getRelativeIds: function (id, limit) {
-
- const tmp = [];
-
- if (!limit) limit = 6; //3
-
- const ids = Headlines.getLoaded();
-
- for (let i = 0; i < ids.length; i++) {
- if (ids[i] == id) {
- for (let k = 1; k <= limit; k++) {
- //if (i > k-1) tmp.push(ids[i-k]);
- if (i < ids.length - k) tmp.push(ids[i + k]);
- }
- break;
- }
- }
-
- return tmp;
- },
mouseIn: function (id) {
this.post_under_pointer = id;
},