diff options
Diffstat (limited to 'src/main/java/at/hannibal2')
3 files changed, 19 insertions, 23 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/DisplayMode.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/DisplayMode.kt deleted file mode 100644 index 55441953c..000000000 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/DisplayMode.kt +++ /dev/null @@ -1,7 +0,0 @@ -package at.hannibal2.skyhanni.utils.tracker - -enum class DisplayMode(val displayName: String) { - TOTAL("Total"), - SESSION("This Session"), - ; -} diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SharedTracker.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SharedTracker.kt deleted file mode 100644 index 9b5ae1d90..000000000 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SharedTracker.kt +++ /dev/null @@ -1,16 +0,0 @@ -package at.hannibal2.skyhanni.utils.tracker - -class SharedTracker<T : TrackerData>( - private val total: T, - private val currentSession: T, -) { - fun modify(modifyFunction: (T) -> Unit) { - modifyFunction(total) - modifyFunction(currentSession) - } - - fun get(displayMode: DisplayMode) = when (displayMode) { - DisplayMode.TOTAL -> total - DisplayMode.SESSION -> currentSession - } -} 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 8d5b723df..4cf1f8e5f 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt @@ -96,4 +96,23 @@ class SkyHanniTracker<Data : TrackerData>( update() } } + + class SharedTracker<Data : TrackerData>(private val total: Data, private val currentSession: Data, ) { + fun modify(modifyFunction: (Data) -> Unit) { + modifyFunction(total) + modifyFunction(currentSession) + } + + fun get(displayMode: DisplayMode) = when (displayMode) { + DisplayMode.TOTAL -> total + DisplayMode.SESSION -> currentSession + } + } + + enum class DisplayMode(val displayName: String) { + TOTAL("Total"), + SESSION("This Session"), + ; + } + } |