Merge pull request #797 from torhve/syncfix
handlers: check for active buffer
This commit is contained in:
commit
f633993a93
|
@ -306,7 +306,7 @@ weechat.factory('handlers', ['$rootScope', '$log', 'models', 'plugins', 'notific
|
||||||
var handleBufferTypeChanged = function(message) {
|
var handleBufferTypeChanged = function(message) {
|
||||||
var obj = message.objects[0].content[0];
|
var obj = message.objects[0].content[0];
|
||||||
var buffer = obj.pointers[0];
|
var buffer = obj.pointers[0];
|
||||||
var old = models.getBuffer(buffer);
|
//var old = models.getBuffer(buffer);
|
||||||
// 0 = formatted (normal); 1 = free
|
// 0 = formatted (normal); 1 = free
|
||||||
buffer.bufferType = obj.type;
|
buffer.bufferType = obj.type;
|
||||||
};
|
};
|
||||||
|
@ -350,6 +350,12 @@ weechat.factory('handlers', ['$rootScope', '$log', 'models', 'plugins', 'notific
|
||||||
var hotlist = message.objects[0].content;
|
var hotlist = message.objects[0].content;
|
||||||
hotlist.forEach(function(l) {
|
hotlist.forEach(function(l) {
|
||||||
var buffer = models.getBuffer(l.buffer);
|
var buffer = models.getBuffer(l.buffer);
|
||||||
|
// If buffer is active in gb, but not active in WeeChat the
|
||||||
|
// hotlist in WeeChat will increase but we should ignore that
|
||||||
|
// in gb.
|
||||||
|
if (buffer.active) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 1 is message
|
// 1 is message
|
||||||
buffer.unread = l.count[1];
|
buffer.unread = l.count[1];
|
||||||
// 2 is private
|
// 2 is private
|
||||||
|
|
Loading…
Reference in New Issue