Remove duplicate source of truth with buffers.
This commit is contained in:
parent
118b401d76
commit
b21662da3c
2 changed files with 4 additions and 6 deletions
|
@ -774,9 +774,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
|||
});
|
||||
|
||||
$rootScope.$on('relayDisconnect', function() {
|
||||
// this reinitialze just breaks the bufferlist upon reconnection.
|
||||
// Disabled it until it's fully investigated and fixed
|
||||
//models.reinitialize();
|
||||
models.reinitialize();
|
||||
$rootScope.$emit('notificationChanged');
|
||||
$scope.connectbutton = 'Connect';
|
||||
});
|
||||
|
@ -784,7 +782,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
|||
|
||||
$scope.showSidebar = true;
|
||||
|
||||
$scope.buffers = models.model.buffers;
|
||||
$scope.getBuffers = models.getBuffers.bind(models);
|
||||
|
||||
$scope.bufferlines = {};
|
||||
$scope.nicklist = {};
|
||||
|
@ -1125,7 +1123,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
|||
|
||||
$rootScope.switchToActivityBuffer = function() {
|
||||
// Find next buffer with activity and switch to it
|
||||
var sortedBuffers = _.sortBy($scope.buffers, 'number');
|
||||
var sortedBuffers = _.sortBy($scope.getBuffers(), 'number');
|
||||
var i, buffer;
|
||||
// Try to find buffer with notification
|
||||
for (i in sortedBuffers) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue