mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-20 01:21:28 +00:00
show icons in feedlist
This commit is contained in:
28
feedlist.js
28
feedlist.js
@@ -506,6 +506,15 @@ function parse_counters(reply, scheduled_call) {
|
||||
if (kind != "cat") {
|
||||
//setFeedValue(id, false, 'error', error);
|
||||
setFeedValue(id, false, 'updated', updated);
|
||||
|
||||
if (id > 0) {
|
||||
if (has_img) {
|
||||
setFeedIcon(id, false,
|
||||
getInitParam("icons_url") + "/" + id + ".ico");
|
||||
} else {
|
||||
setFeedIcon(id, false, 'images/blank_icon.gif');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -915,3 +924,22 @@ function selectFeed(feed, is_cat) {
|
||||
exception_error("selectFeed", e);
|
||||
}
|
||||
}
|
||||
|
||||
function setFeedIcon(feed, is_cat, src) {
|
||||
try {
|
||||
var tree = dijit.byId("feedTree");
|
||||
|
||||
if (is_cat)
|
||||
treeNode = tree._itemNodesMap['CAT:' + feed];
|
||||
else
|
||||
treeNode = tree._itemNodesMap['FEED:' + feed];
|
||||
|
||||
if (treeNode) {
|
||||
treeNode = treeNode[0];
|
||||
treeNode.iconNode.src = src;
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
exception_error("setFeedIcon", e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user