|  | @@ -19,9 +19,9 @@
 | 
	
		
			
				|  |  |  #include "../gui/CGuiHandler.h"
 | 
	
		
			
				|  |  |  #include "../gui/WindowHandler.h"
 | 
	
		
			
				|  |  |  #include "../widgets/TextControls.h"
 | 
	
		
			
				|  |  | +#include "../widgets/Slider.h"
 | 
	
		
			
				|  |  |  #include "../widgets/ObjectLists.h"
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -#include "../../lib/CConfigHandler.h"
 | 
	
		
			
				|  |  |  #include "../../lib/Languages.h"
 | 
	
		
			
				|  |  |  #include "../../lib/MetaString.h"
 | 
	
		
			
				|  |  |  #include "../../lib/TextOperations.h"
 | 
	
	
		
			
				|  | @@ -51,13 +51,14 @@ void GlobalLobbyWindow::doOpenChannel(const std::string & channelType, const std
 | 
	
		
			
				|  |  |  	currentChannelName = channelName;
 | 
	
		
			
				|  |  |  	chatHistory.clear();
 | 
	
		
			
				|  |  |  	unreadChannels.erase(channelType + "_" + channelName);
 | 
	
		
			
				|  |  | -	widget->getGameChat()->setText("");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	auto history = CSH->getGlobalLobby().getChannelHistory(channelType, channelName);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	for(const auto & entry : history)
 | 
	
		
			
				|  |  |  		onGameChatMessage(entry.displayName, entry.messageText, entry.timeFormatted, channelType, channelName);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +	refreshChatText();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  	MetaString text;
 | 
	
		
			
				|  |  |  	text.appendTextID("vcmi.lobby.header.chat." + channelType);
 | 
	
		
			
				|  |  |  	text.replaceRawString(roomDescription);
 | 
	
	
		
			
				|  | @@ -133,8 +134,12 @@ void GlobalLobbyWindow::onGameChatMessage(const std::string & sender, const std:
 | 
	
		
			
				|  |  |  	chatMessageFormatted.replaceRawString(message);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	chatHistory += chatMessageFormatted.toString();
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +void GlobalLobbyWindow::refreshChatText()
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  |  	widget->getGameChat()->setText(chatHistory);
 | 
	
		
			
				|  |  | +	if (widget->getGameChat()->slider)
 | 
	
		
			
				|  |  | +		widget->getGameChat()->slider->scrollToMax();
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  bool GlobalLobbyWindow::isChannelUnread(const std::string & channelType, const std::string & channelName) const
 |