initalise lastread marker to last line initially fetched from server

This commit is contained in:
Lorenz H-S 2013-12-13 23:59:51 +00:00
parent c7123a26e4
commit f129460426
2 changed files with 5 additions and 1 deletions

View file

@ -23,7 +23,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
var active = false
var notification = 0
var unread = 0
var lastSeen = -2
var lastSeen = -1
var serverSortKey = fullName.replace(/^irc.server.(\w+)/, "irc.$1");
var indent = function(predicate) {

View file

@ -30,6 +30,10 @@ weechat.factory('handlers', ['$rootScope', 'models', 'plugins', function($rootSc
message = plugins.PluginManager.contentForMessage(message, $rootScope.visible);
buffer.addLine(message);
if (initial) {
buffer.lastSeen++;
}
if (buffer.active) {
$rootScope.scrollToBottom();
}