mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-24 03:53:12 -04:00
Resolved #11892 - Duplicate notifications are all shown
@SomeTroglodyte We need to better fine-tune the notification de-duplication, often we *do* want duplicates
This commit is contained in:
parent
661d7a1b79
commit
6ed43a2280
@ -887,10 +887,6 @@ class Civilization : IsPartOfGameInfoSerialization {
|
||||
|
||||
fun addNotification(text: String, actions: Iterable<NotificationAction>?, category: NotificationCategory, vararg notificationIcons: String) {
|
||||
if (playerType == PlayerType.AI) return // no point in lengthening the saved game info if no one will read it
|
||||
if (notifications.lastOrNull()?.let { it.text == text && it.category == category && it.icons == notificationIcons.toList() } == true) {
|
||||
Log.debug("Duplicate notification \"%s\"", text)
|
||||
return
|
||||
}
|
||||
notifications.add(Notification(text, notificationIcons, actions, category))
|
||||
}
|
||||
// endregion
|
||||
|
Loading…
x
Reference in New Issue
Block a user