Move 'dynamic favicon' from Server to User pref

This commit is contained in:
Chris Hunt
2013-06-14 23:58:24 -07:00
parent 3a02012dc5
commit 09d3800701
13 changed files with 21 additions and 7 deletions

View File

@ -75,7 +75,7 @@ Discourse = Ember.Application.createWithMixins({
$('title').text(title);
var notifyCount = this.get('notifyCount');
if (notifyCount > 0 && !Discourse.SiteSettings.dynamic_favicon) {
if (notifyCount > 0 && !Discourse.User.current('dynamic_favicon')) {
title = "(" + notifyCount + ") " + title;
}
// chrome bug workaround see: http://stackoverflow.com/questions/2952384/changing-the-window-title-when-focussing-the-window-doesnt-work-in-chrome
@ -86,7 +86,7 @@ Discourse = Ember.Application.createWithMixins({
}.observes('title', 'hasFocus', 'notifyCount'),
faviconChanged: function() {
if(Discourse.SiteSettings.dynamic_favicon) {
if(Discourse.User.current('dynamic_favicon')) {
$.faviconNotify(
Discourse.SiteSettings.favicon_url, this.get('notifyCount')
);