[Client] Fix saving channel history

This commit is contained in:
Koncord 2017-12-08 22:36:16 +08:00
parent 1c7330635b
commit 7eecbfd08e

View file

@ -365,8 +365,8 @@ namespace mwmp
void GUIChat::setChannel(ChannelIter it, bool saveHistory) void GUIChat::setChannel(ChannelIter it, bool saveHistory)
{ {
if (saveHistory) if (saveHistory && !mHistory->getCaption().empty())
channels[currentChannel].channelText = mHistory->getCaption(); getChannel(currentChannel)->channelText = mHistory->getCaption();
mHistory->setCaption(it->channelText); mHistory->setCaption(it->channelText);
currentChannel = it->channel; currentChannel = it->channel;