Browse Source

Only play sound in lobby for global channels if lobby UI is active

Ivan Savenko 9 months ago
parent
commit
029a5699c3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      client/globalLobby/GlobalLobbyClient.cpp

+ 1 - 1
client/globalLobby/GlobalLobbyClient.cpp

@@ -171,7 +171,7 @@ void GlobalLobbyClient::receiveChatMessage(const JsonNode & json)
 		lobbyWindowPtr->onGameChatMessage(message.displayName, message.messageText, message.timeFormatted, channelType, channelName);
 		lobbyWindowPtr->refreshChatText();
 
-		if(channelType == "player" || lobbyWindowPtr->isChannelOpen(channelType, channelName))
+		if(channelType == "player" || (lobbyWindowPtr->isChannelOpen(channelType, channelName) && lobbyWindowPtr->isActive()))
 			CCS->soundh->playSound(AudioPath::builtin("CHAT"));
 	}
 }