aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-25 03:27:24 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-25 03:27:24 +0100
commitd523de1e3e4e39bd55d1b1426a4ead961ffcfa69 (patch)
treeebe2c1c57eeb3325cc78dd56b676591ac4a2f9c5 /src/main/java/at
parentf92544ee261b3470a35dbc52dca4079e6be4878b (diff)
downloadskyhanni-d523de1e3e4e39bd55d1b1426a4ead961ffcfa69.tar.gz
skyhanni-d523de1e3e4e39bd55d1b1426a4ead961ffcfa69.tar.bz2
skyhanni-d523de1e3e4e39bd55d1b1426a4ead961ffcfa69.zip
hide category setting when inventory is closed
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt
index 27bcad12a..fd097d68b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt
@@ -128,15 +128,18 @@ object FishingProfitTracker {
if (currentCategory !in list) {
currentCategory = nameAll
}
- addButton(
- prefix = "§7Category: ",
- getName = currentCategory + " §7(" + amounts[currentCategory] + ")",
- onChange = {
- val id = list.indexOf(currentCategory)
- currentCategory = list[(id + 1) % list.size]
- tracker.update()
- }
- )
+
+ if (tracker.isInventoryOpen()) {
+ addButton(
+ prefix = "§7Category: ",
+ getName = currentCategory + " §7(" + amounts[currentCategory] + ")",
+ onChange = {
+ val id = list.indexOf(currentCategory)
+ currentCategory = list[(id + 1) % list.size]
+ tracker.update()
+ }
+ )
+ }
val filter: (NEUInternalName) -> Boolean = if (currentCategory == nameAll) {
{ true }