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:
yairm210 2024-07-08 12:30:54 +03:00
parent 661d7a1b79
commit 6ed43a2280

View File

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