1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 18:35:57 +00:00

add Headlines.renderAgain() to switch between combined/expanded modes faster

This commit is contained in:
Andrew Dolgov
2018-12-10 15:06:47 +03:00
parent 7915706946
commit 54f02a3b31
3 changed files with 52 additions and 25 deletions

View File

@@ -160,6 +160,16 @@ define(["dojo/_base/declare"], function (declare) {
${__('Originally from:')} <a target="_blank" rel="noopener noreferrer" href="${hl.orig_feed[1]}">${hl.orig_feed[0]}</a>
</span>` : "";
},
unpack: function(row) {
if (row.hasAttribute("data-content")) {
console.log("unpacking: " + row.id);
row.select(".content-inner")[0].innerHTML = row.getAttribute("data-content");
row.removeAttribute("data-content");
PluginHost.run(PluginHost.HOOK_ARTICLE_RENDERED_CDM, row);
}
},
view: function (id, noexpand) {
this.setActive(id);
@@ -283,14 +293,7 @@ define(["dojo/_base/declare"], function (declare) {
const row = $("RROW-" + id);
if (row) {
if (row.hasAttribute("data-content")) {
console.log("unpacking: " + row.id);
row.select(".content-inner")[0].innerHTML = row.getAttribute("data-content");
row.removeAttribute("data-content");
PluginHost.run(PluginHost.HOOK_ARTICLE_RENDERED_CDM, row);
}
Article.unpack(row);
if (row.hasClassName("Unread")) {