Merge pull request #698 from fkloft/compact

Repair compact tab
This commit is contained in:
Jon Atkins 2013-12-13 09:36:10 -08:00
commit fba399fa76

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];
});
}