mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
Convert Discourse.User
to use Discourse.Singleton
This commit is contained in:
parent
8e1fae0459
commit
51f5cf77fb
23 changed files with 90 additions and 57 deletions
|
@ -38,7 +38,7 @@ Discourse = Ember.Application.createWithMixins(Discourse.Ajax, {
|
|||
$('title').text(title);
|
||||
|
||||
var notifyCount = this.get('notifyCount');
|
||||
if (notifyCount > 0 && !Discourse.User.current('dynamic_favicon')) {
|
||||
if (notifyCount > 0 && !Discourse.User.currentProp('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
|
||||
|
@ -49,7 +49,7 @@ Discourse = Ember.Application.createWithMixins(Discourse.Ajax, {
|
|||
}.observes('title', 'hasFocus', 'notifyCount'),
|
||||
|
||||
faviconChanged: function() {
|
||||
if(Discourse.User.current('dynamic_favicon')) {
|
||||
if(Discourse.User.currentProp('dynamic_favicon')) {
|
||||
$.faviconNotify(
|
||||
Discourse.SiteSettings.favicon_url, this.get('notifyCount')
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue