models: add activeBufferChanged signal
When the active buffer is changed on the model, the model now emits a signal on the rootScope
This commit is contained in:
parent
824e86774c
commit
fb0ce21fc5
1 changed files with 5 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
var models = angular.module('weechatModels', []);
|
||||
|
||||
models.service('models', ['colors', function(colors) {
|
||||
models.service('models', ['$rootScope', 'colors', function($rootScope, colors) {
|
||||
/*
|
||||
* Buffer class
|
||||
*/
|
||||
|
@ -160,9 +160,12 @@ models.service('models', ['colors', function(colors) {
|
|||
return buffer;
|
||||
}
|
||||
});
|
||||
|
||||
activeBuffer.notification = false;
|
||||
activeBuffer.active = true;
|
||||
activeBuffer.unread = '';
|
||||
|
||||
$rootScope.$emit('activeBufferChanged');
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue