aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt
index 825931150..fd2d4623b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt
@@ -65,6 +65,7 @@ object ItemPickupLog {
private var itemsAddedToInventory = mutableMapOf<Int, PickupEntry>()
private var itemsRemovedFromInventory = mutableMapOf<Int, PickupEntry>()
private var display: Renderable? = null
+ private var dirty = false
private val patternGroup = RepoPattern.group("itempickuplog")
private val shopPattern by patternGroup.pattern(
@@ -152,7 +153,8 @@ object ItemPickupLog {
val itemsRemovedUpdated = itemsRemovedFromInventory.values.removeIf { it.isExpired() }
val itemsAddedUpdated = itemsAddedToInventory.values.removeIf { it.isExpired() }
- if (itemsRemovedUpdated || itemsAddedUpdated || itemList != oldItemList) {
+ if (itemsRemovedUpdated || itemsAddedUpdated || itemList != oldItemList || dirty) {
+ dirty = false
updateDisplay()
}
}
@@ -174,6 +176,7 @@ object ItemPickupLog {
}
targetInventory[hash] = itemInfo
+ dirty = true
}
private fun renderList(prefix: String, entry: PickupEntry) = Renderable.horizontalContainer(