mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-22 19:08:48 -04:00
minor refactor
This commit is contained in:
parent
76d969074a
commit
437f89bffc
@ -97,16 +97,14 @@ object ChatStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (chatPopup == null && incomingChatMsg.civName != "System") {
|
if (chatPopup == null && incomingChatMsg.civName != "System") {
|
||||||
if (UncivGame.Current.worldScreen == null) {
|
if (gameId.equals(UncivGame.Current.worldScreen?.gameInfo?.gameId?.toUUIDOrNull())) {
|
||||||
// user is out of world screen
|
|
||||||
chat.read = false
|
|
||||||
} else if (gameId.equals(UncivGame.Current.worldScreen?.gameInfo?.gameId?.toUUIDOrNull())) {
|
|
||||||
// ensures that you are not getting notified for your own messages
|
// ensures that you are not getting notified for your own messages
|
||||||
if (UncivGame.Current.worldScreen?.gameInfo?.currentPlayer != incomingChatMsg.civName) {
|
if (UncivGame.Current.worldScreen?.gameInfo?.currentPlayer != incomingChatMsg.civName) {
|
||||||
chat.read = false
|
chat.read = false
|
||||||
UncivGame.Current.worldScreen?.chatButton?.startFlashing()
|
UncivGame.Current.worldScreen?.chatButton?.startFlashing()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// user is out of world screen or
|
||||||
// some other game not currently on screen has a message
|
// some other game not currently on screen has a message
|
||||||
chat.read = false
|
chat.read = false
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user