@ -4,10 +4,11 @@
var weechat = angular . module ( 'weechat' ) ;
var weechat = angular . module ( 'weechat' ) ;
weechat . factory ( 'connection' ,
weechat . factory ( 'connection' ,
[ '$rootScope' , '$log' , 'handlers' , 'models' , 'ngWebsockets' , function ( $rootScope ,
[ '$rootScope' , '$log' , 'handlers' , 'models' , 'settings' , ' ngWebsockets' , function ( $rootScope ,
$log ,
$log ,
handlers ,
handlers ,
models ,
models ,
settings ,
ngWebsockets ) {
ngWebsockets ) {
var protocol = new weeChat . Protocol ( ) ;
var protocol = new weeChat . Protocol ( ) ;
@ -194,6 +195,7 @@ weechat.factory('connection',
handlers . handleHotlistInfo ( hotlist ) ;
handlers . handleHotlistInfo ( hotlist ) ;
} ) ;
} ) ;
if ( settings . hotlistsync ) {
// Schedule hotlist syncing every so often so that this
// Schedule hotlist syncing every so often so that this
// client will have unread counts (mostly) in sync with
// client will have unread counts (mostly) in sync with
// other clients or terminal usage directly.
// other clients or terminal usage directly.
@ -205,6 +207,7 @@ weechat.factory('connection',
} ) ;
} ) ;
}
}
} , 60000 ) ; // Sync hotlist every 60 second
} , 60000 ) ; // Sync hotlist every 60 second
}
// Fetch weechat time format for displaying timestamps
// Fetch weechat time format for displaying timestamps