diff options
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt | 12 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt | 2 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt index 66357e1c0..85d623fa1 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt @@ -38,6 +38,11 @@ class SkyHanniItemTracker<Data : ItemTrackerData>( modify { it.additem(internalName, stackSize) } + getSharedTracker()?.let { + val hidden = it.get(DisplayMode.TOTAL).items[internalName]!!.hidden + it.get(DisplayMode.SESSION).items[internalName]!!.hidden = hidden + } + } fun addPriceFromButton(lists: MutableList<List<Any>>) { @@ -95,8 +100,9 @@ class SkyHanniItemTracker<Data : ItemTrackerData>( LorenzUtils.chat("§e[SkyHanni] Removed $cleanName §efrom Fishing Frofit Tracker.") lastClickDelay = System.currentTimeMillis() + 500 } else { - itemProfit.hidden = !hidden - + modify { + it.items[internalName]?.hidden = !hidden + } lastClickDelay = System.currentTimeMillis() } update() @@ -133,6 +139,8 @@ class SkyHanniItemTracker<Data : ItemTrackerData>( } add("§eClick to " + (if (hidden) "show" else "hide") + "!") add("§eControl + Click to remove this item!") + add("") + add("§7${internalName}") } } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt index 3d68b8316..331be034b 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt @@ -122,7 +122,7 @@ open class SkyHanniTracker<Data : TrackerData>( } ) - private fun getSharedTracker() = ProfileStorageData.profileSpecific?.let { + protected fun getSharedTracker() = ProfileStorageData.profileSpecific?.let { SharedTracker(getStorage(it), currentSessions.getOrPut(it) { createNewSession() }) } |