summaryrefslogtreecommitdiff
path: root/js/Headlines.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-03-10 08:33:56 +0300
committerAndrew Dolgov <[email protected]>2021-03-10 08:33:56 +0300
commitddfa39015e374f7bee0d5b241391c87752db2dc4 (patch)
tree54fff3b1188e0fe10368f528a18705330df68f14 /js/Headlines.js
parent6ec66d0ce5dd3dc79e72ac562448045526756280 (diff)
experimental: add preference to show combined mode headlines as a 2 column grid
Diffstat (limited to 'js/Headlines.js')
-rwxr-xr-xjs/Headlines.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/Headlines.js b/js/Headlines.js
index 8d7e06f41..8f104c951 100755
--- a/js/Headlines.js
+++ b/js/Headlines.js
@@ -431,6 +431,8 @@ const Headlines = {
this.unpack_observer.observe(e)
});
+ dijit.byId('main').resize();
+
},
render: function (headlines, hl) {
let row = null;
@@ -459,6 +461,11 @@ const Headlines = {
this.vgroup_last_feed = hl.feed_id;
}
+ const container = App.byId("headlines-frame");
+
+ container.setAttribute("data-is-cdm", App.isCombinedMode() ? "true" : "false");
+ container.setAttribute("data-is-cdm-expanded", App.getInitParam("cdm_expanded"));
+
if (App.isCombinedMode()) {
row_class += App.getInitParam("cdm_expanded") ? " expanded" : " expandable";
@@ -677,9 +684,13 @@ const Headlines = {
// also called in renderAgain() after view mode switch
Headlines.setCommonClasses();
+ /** TODO: remove @deprecated */
App.byId("headlines-frame").setAttribute("is-vfeed",
reply['headlines']['is_vfeed'] ? 1 : 0);
+ App.byId("headlines-frame").setAttribute("data-is-vfeed",
+ reply['headlines']['is_vfeed'] ? "true" : "false");
+
Article.setActive(0);
try {
@@ -820,6 +831,8 @@ const Headlines = {
// unpack visible articles, fill buffer more, etc
this.scrollHandler();
+ dijit.byId('main').resize();
+
Notify.close();
},
reverse: function () {