Repair compact tab

This commit is contained in:
fkloft 2013-12-13 17:54:25 +01:00
parent 1279179407
commit ca3ad18217

View File

@ -228,12 +228,12 @@ window.chat.renderCompact = function(oldMsgsWereAdded) {
$.each(chat._public.data, function(guid, entry) {
// skip player msgs
if(!entry[1]) return true;
var pguid = entry[3];
var nick = entry[3];
// ignore if player has newer data
if(data[pguid] && data[pguid][0] > entry[0]) return true;
data[pguid] = entry;
if(data[nick] && data[nick][0] > entry[0]) return true;
data[nick] = entry;
});
// data keys are now player guids instead of message guids. However,
// data keys are now player nicks instead of message guids. However,
// it is all the same to renderData.
chat.renderData(data, 'chatcompact', oldMsgsWereAdded);
}
@ -350,7 +350,7 @@ window.chat.writeDataToHash = function(newData, storageHash, isPublicChannel, is
// format: timestamp, autogenerated, HTML message
storageHash.data[json[0]] = [json[1], auto, chat.renderMsg(msg, nick, time, team, msgToPlayer, systemNarrowcast)];
storageHash.data[json[0]] = [json[1], auto, chat.renderMsg(msg, nick, time, team, msgToPlayer, systemNarrowcast), nick];
});
}