aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-08-02 10:58:41 +0200
committerGitHub <noreply@github.com>2024-08-02 10:58:41 +0200
commita197d3de1ccedc8a027353d61d028389fa84fc9e (patch)
tree62b91609c75788ed030fb3fb5afcd04a3509eae4 /src/main/java/at/hannibal2/skyhanni/features
parent1bc224af7c15708799108ed079b4ccd9f4ef852e (diff)
downloadskyhanni-a197d3de1ccedc8a027353d61d028389fa84fc9e.tar.gz
skyhanni-a197d3de1ccedc8a027353d61d028389fa84fc9e.tar.bz2
skyhanni-a197d3de1ccedc8a027353d61d028389fa84fc9e.zip
Fix: Sack Item Pickup Log delay (#2292)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-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(