From 42db7ef96003b87280e3f041aed63112636ea5ed Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 13 Jun 2024 00:00:03 +0200 Subject: code cleanup --- .../skyhanni/features/inventory/wardrobe/CustomWardrobe.kt | 1 + .../at/hannibal2/skyhanni/features/misc/items/enchants/Cache.kt | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt index 521be1429..65fa2f7fa 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt @@ -39,6 +39,7 @@ import java.awt.Color import kotlin.math.min import kotlin.time.Duration.Companion.milliseconds +// TODO add support for estimated item value @SkyHanniModule object CustomWardrobe { diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/enchants/Cache.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/enchants/Cache.kt index c01c52124..3c355a5a7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/enchants/Cache.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/enchants/Cache.kt @@ -16,8 +16,5 @@ class Cache { configChanged = false } - fun isCached(loreBeforeModification: List): Boolean { - if (configChanged || loreBeforeModification.size != cachedLoreBefore.size) return false - return loreBeforeModification.indices.none { loreBeforeModification[it] != cachedLoreBefore[it] } - } -} \ No newline at end of file + fun isCached(loreBeforeModification: List): Boolean = !configChanged && loreBeforeModification == cachedLoreBefore +} -- cgit