From 437f89bffcb987c7a0cb58acfb680880812311da Mon Sep 17 00:00:00 2001 From: "Md. Touhidur Rahman" Date: Fri, 12 Sep 2025 21:29:19 +0600 Subject: [PATCH] minor refactor --- core/src/com/unciv/logic/multiplayer/chat/ChatStore.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/src/com/unciv/logic/multiplayer/chat/ChatStore.kt b/core/src/com/unciv/logic/multiplayer/chat/ChatStore.kt index 23c5245759..e5d6e2b858 100644 --- a/core/src/com/unciv/logic/multiplayer/chat/ChatStore.kt +++ b/core/src/com/unciv/logic/multiplayer/chat/ChatStore.kt @@ -97,16 +97,14 @@ object ChatStore { } if (chatPopup == null && incomingChatMsg.civName != "System") { - if (UncivGame.Current.worldScreen == null) { - // user is out of world screen - chat.read = false - } else if (gameId.equals(UncivGame.Current.worldScreen?.gameInfo?.gameId?.toUUIDOrNull())) { + if (gameId.equals(UncivGame.Current.worldScreen?.gameInfo?.gameId?.toUUIDOrNull())) { // ensures that you are not getting notified for your own messages if (UncivGame.Current.worldScreen?.gameInfo?.currentPlayer != incomingChatMsg.civName) { chat.read = false UncivGame.Current.worldScreen?.chatButton?.startFlashing() } } else { + // user is out of world screen or // some other game not currently on screen has a message chat.read = false }