[Client] Fix saving channel history

sol2-server-rewrite
Koncord 7 years ago
parent 1c7330635b
commit 7eecbfd08e

@ -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;

Loading…
Cancel
Save