Fix globals. Fix init
This commit is contained in:
parent
2aa1e02bea
commit
2452858853
|
@ -328,10 +328,8 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
|
||||||
|
|
||||||
|
|
||||||
var BufferList = [];
|
var BufferList = [];
|
||||||
activeBuffer = null;
|
var activeBuffer = null;
|
||||||
previousBuffer = null;
|
var previousBuffer = null;
|
||||||
unreads = 0;
|
|
||||||
notifications = 0;
|
|
||||||
|
|
||||||
this.model = { 'buffers': {} };
|
this.model = { 'buffers': {} };
|
||||||
|
|
||||||
|
@ -344,7 +342,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
|
||||||
this.addBuffer = function(buffer) {
|
this.addBuffer = function(buffer) {
|
||||||
BufferList[buffer.id] = buffer;
|
BufferList[buffer.id] = buffer;
|
||||||
if (BufferList.length === 1) {
|
if (BufferList.length === 1) {
|
||||||
activeBuffer = buffer.id;
|
activeBuffer = buffer;
|
||||||
}
|
}
|
||||||
this.model.buffers[buffer.id] = buffer;
|
this.model.buffers[buffer.id] = buffer;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue