models: add activeBufferChanged signal

When the active buffer is changed on the model, the model
now emits a signal on the rootScope
with-route-provider
David Cormier 12 years ago
parent 824e86774c
commit fb0ce21fc5
  1. 5
      js/models.js

@ -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…
Cancel
Save