aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/update/GuiOptionEditorUpdateCheck.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt6
3 files changed, 4 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt
index b81e1efb8..4059761c3 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt
@@ -51,8 +51,7 @@ import kotlin.concurrent.fixedRateTimer
typealias TrackerDisplayMode = SkyHanniTracker.DefaultDisplayMode
private fun GsonBuilder.reigsterIfBeta(create: TypeAdapterFactory): GsonBuilder {
- val isBeta = SkyHanniMod.version.contains("beta", ignoreCase = true)
- return if (isBeta) {
+ return if (LorenzUtils.isBetaVersion()) {
registerTypeAdapterFactory(create)
} else this
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/update/GuiOptionEditorUpdateCheck.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/update/GuiOptionEditorUpdateCheck.kt
index 3b75291a0..e92d6bdf3 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/update/GuiOptionEditorUpdateCheck.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/update/GuiOptionEditorUpdateCheck.kt
@@ -1,5 +1,6 @@
package at.hannibal2.skyhanni.features.misc.update
+import at.hannibal2.skyhanni.SkyHanniMod
import io.github.moulberry.moulconfig.gui.GuiOptionEditor
import io.github.moulberry.moulconfig.internal.TextRenderUtils
import io.github.moulberry.moulconfig.processor.ProcessedOption
@@ -44,7 +45,7 @@ class GuiOptionEditorUpdateCheck(option: ProcessedOption) : GuiOptionEditor(opti
val widthRemaining = width - button.width - 10
GlStateManager.scale(2F, 2F, 1F)
- val currentVersion = UpdateManager.getCurrentVersion()
+ val currentVersion = SkyHanniMod.version
val sameVersion = currentVersion.equals(nextVersion, true)
TextRenderUtils.drawStringCenteredScaledMaxWidth(
"${if (UpdateManager.updateState == UpdateManager.UpdateState.NONE) GREEN else RED}$currentVersion" +
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt
index f064ac574..b96533cc6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt
@@ -56,10 +56,6 @@ object UpdateManager {
checkUpdate()
}
- fun getCurrentVersion(): String {
- return SkyHanniMod.version
- }
-
fun injectConfigProcessor(processor: MoulConfigProcessor<*>) {
processor.registerConfigEditor(ConfigVersionDisplay::class.java) { option, _ ->
GuiOptionEditorUpdateCheck(option)
@@ -67,7 +63,7 @@ object UpdateManager {
}
fun isCurrentlyBeta(): Boolean {
- return getCurrentVersion().contains("beta", ignoreCase = true)
+ return SkyHanniMod.version.contains("beta", ignoreCase = true)
}
private val config get() = SkyHanniMod.feature.about