GUI2/Chatbox: fixed close button being shown for lobby tab when reloading log

Fixes #2992.
This commit is contained in:
Charles Dang 2018-05-04 13:08:19 +11:00
parent ffe71c5157
commit 65a554f41d

View file

@ -95,11 +95,13 @@ void chatbox::finalize_setup()
void chatbox::load_log(std::map<std::string, chatroom_log>& log, bool show_lobby)
{
for(const auto& l : log) {
if(!show_lobby && l.first == "lobby" && !l.second.whisper) {
const bool is_lobby = l.first == "lobby";
if(!show_lobby && is_lobby && !l.second.whisper) {
continue;
}
find_or_create_window(l.first, l.second.whisper, true, true, l.second.log);
find_or_create_window(l.first, l.second.whisper, true, !is_lobby, l.second.log);
}
log_ = &log;