diff --git a/index.html b/index.html
index bb2b270..5bd5bbb 100644
--- a/index.html
+++ b/index.html
@@ -215,7 +215,7 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
-
+
{{ buffer.shortName || buffer.fullName }}
diff --git a/js/glowingbear.js b/js/glowingbear.js
index 4869862..9c15aa5 100644
--- a/js/glowingbear.js
+++ b/js/glowingbear.js
@@ -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) {