Fix the title change and rename events to use the new model

This commit is contained in:
Tor Hveem 2013-10-10 12:37:25 +02:00
parent 5ae3ca27ca
commit 21d19b5aac
1 changed files with 7 additions and 6 deletions

View File

@ -230,16 +230,17 @@ weechat.factory('handlers', ['$rootScope', 'colors', 'models', 'plugins', functi
var handleBufferTitleChanged = function(message) {
var obj = message['objects'][0]['content'][0];
var buffer = obj['pointers'][0];
var old = $rootScope.buffers[buffer];
old['full_name'] = obj['full_name'];
old['title'] = obj['title'];
var old = models.getBuffer(buffer);
old.fullName = obj['full_name'];
old.title = obj['title'];
old.number = obj['number'];
}
var handleBufferRenamed = function(message) {
var obj = message['objects'][0]['content'][0];
var buffer = obj['pointers'][0];
var old = $rootScope.buffers[buffer];
old['full_name'] = obj['full_name'];
old['short_name'] = obj['short_name'];
var old = models.getBuffer(buffer);
old.fullName = obj['full_name'];
old.shortName = obj['short_name'];
}