From 0a74acf17043385efb04547604d8a7e359fd9a34 Mon Sep 17 00:00:00 2001 From: David Cormier Date: Sun, 16 Feb 2014 17:16:39 -0500 Subject: [PATCH] ActiveBufferChanged signal passes buffer object --- js/glowingbear.js | 3 ++- js/models.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/js/glowingbear.js b/js/glowingbear.js index 79561da..506e7c3 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -536,7 +536,8 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', $scope.isinstalled = false; } - $rootScope.$on('activeBufferChanged', function() { + $rootScope.$on('activeBufferChanged', function(signal, + activeBuffer) { $rootScope.scrollWithBuffer(true); var ab = models.getActiveBuffer(); diff --git a/js/models.js b/js/models.js index 8c3cb38..063c98e 100644 --- a/js/models.js +++ b/js/models.js @@ -405,7 +405,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) activeBuffer.unread = 0; activeBuffer.notification = 0; - $rootScope.$emit('activeBufferChanged'); + $rootScope.$emit('activeBufferChanged', activeBuffer); $rootScope.$emit('notificationChanged'); return true; };