minor refactor

This commit is contained in:
Md. Touhidur Rahman 2025-09-12 21:29:19 +06:00
parent 76d969074a
commit 437f89bffc
No known key found for this signature in database
GPG Key ID: 431978882FE25058

View File

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