Try to fetch all unread lines if that is a reasonable amount

Partially fixes #139 in that it tries to accomplish this, but until we can request
only non-filtered lines from WeeChat, the best thing we can do is guessing.
This commit is contained in:
Lorenz Hübschle-Schneider 2014-03-07 17:07:05 +00:00
commit 203680ff58
2 changed files with 18 additions and 5 deletions

View file

@ -419,11 +419,13 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
previousBuffer.lastSeen = previousBuffer.lines.length-1;
}
var unreadSum = activeBuffer.unread + activeBuffer.notification;
activeBuffer.active = true;
activeBuffer.unread = 0;
activeBuffer.notification = 0;
$rootScope.$emit('activeBufferChanged');
$rootScope.$emit('activeBufferChanged', unreadSum);
$rootScope.$emit('notificationChanged');
return true;
};