@ -35,8 +35,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
'showtimestampSeconds' : false ,
'fontsize' : '14px' ,
'fontfamily' : ( utils . isMobileUi ( ) ? 'sans-serif' : 'Inconsolata, Consolas, Monaco, Ubuntu Mono, monospace' ) ,
'readlineBindings' : false ,
'enableJSEmoji' : false
'readlineBindings' : false
} ) ;
$scope . settings = settings ;
@ -113,7 +112,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
buffer . unread = 0 ;
buffer . notification = 0 ;
// Trigger title and favico update
// Trigger title update
$rootScope . $emit ( 'notificationChanged' ) ;
}
@ -216,14 +215,8 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
}
} ) ;
$rootScope . favico = new Favico ( { animation : 'none' } ) ;
$rootScope . $on ( 'notificationChanged' , function ( ) {
notifications . updateTitle ( ) ;
if ( settings . useFavico && $rootScope . favico ) {
notifications . updateFavico ( ) ;
}
} ) ;
$rootScope . $on ( 'relayDisconnect' , function ( ) {
@ -348,17 +341,6 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
$rootScope . predicate = orderbyserver ? 'serverSortKey' : 'number' ;
} ) ;
settings . addCallback ( 'useFavico' , function ( useFavico ) {
// this check is necessary as this is called on page load, too
if ( ! $rootScope . connected ) {
return ;
}
if ( useFavico ) {
notifications . updateFavico ( ) ;
} else {
$rootScope . favico . reset ( ) ;
}
} ) ;
// Update font family when changed
settings . addCallback ( 'fontfamily' , function ( fontfamily ) {
@ -642,7 +624,6 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
if ( $rootScope . connected ) {
$scope . disconnect ( ) ;
}
$scope . favico . reset ( ) ;
}
} ;