made the feedmodel respect the has_icon setting, when this si reported by the api. closes #146
This commit is contained in:
parent
89036d6b1c
commit
da459c2026
2 changed files with 12 additions and 1 deletions
|
|
@ -103,7 +103,7 @@ ListModel {
|
|||
feedId: parseInt(feeds[feed].id),
|
||||
categoryId: parseInt(feeds[feed].cat_id),
|
||||
isCat: false,
|
||||
icon: settings.displayIcons ? ttrss.getIconUrl(feeds[feed].id) : ''
|
||||
icon: settings.displayIcons ? feeds[feed].icon_url : '',
|
||||
lastUpdated: formatedDate
|
||||
})
|
||||
totalUnreadCount += parseInt(feeds[feed].unread)
|
||||
|
|
|
|||
|
|
@ -572,6 +572,17 @@ function process_updateFeeds(callback, httpreq) {
|
|||
var feedid = response.content[i].id;
|
||||
state['categoryfeeds'][catId][i] = feedid;
|
||||
state['feedcache'][feedid] = response.content[i];
|
||||
// render the icon url
|
||||
state['feedcache'][feedid]['icon_url'] = getIconUrl(feedid)
|
||||
if (state['feedcache'][feedid]['has_icon'] !== undefined) {
|
||||
if (!state['feedcache'][feedid]['has_icon']) {
|
||||
var localstring = "qrc:///images"
|
||||
var iconurl = state['feedcache'][feedid]['icon_url']
|
||||
if (iconurl.substring(localstring.length) !== localstring) {
|
||||
state['feedcache'][feedid]['icon_url'] = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(state['categoryfeeds'][catId] && !processPendingRequests(callback)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue