Skip to content

Commit

Permalink
remember lastFaviconRefresh if favicon unchanged
Browse files Browse the repository at this point in the history
Ported from Brief
  • Loading branch information
tanriol committed Jul 26, 2013
1 parent 3ef5fe9 commit 1d44145
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions modules/FeedUpdateService.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -534,13 +534,14 @@ FaviconFetcher.prototype = {

finish: function FaviconFetcher_finish(aFaviconString) {
this.feed.lastFaviconRefresh = Date.now();
let oldFaviconString = this.feed.favicon;
this.feed.favicon = aFaviconString;

if (this.feed.favicon != aFaviconString) {
this.feed.favicon = aFaviconString;
Storage.updateFeedProperties(this.feed);
yield Storage.updateFeedProperties(this.feed, FaviconFetcher_finish.resume);

if (oldFaviconString != aFaviconString)
Services.obs.notifyObservers(null, 'brief:feed-favicon-changed', this.feed.feedID);
}
},
}.gen(),

// nsIRequestObserver
onStartRequest: function FaviconFetcher_lonStartRequest(aRequest, aContext) {
Expand Down

0 comments on commit 1d44145

Please sign in to comment.