diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-04-14 17:00:09 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-04-14 17:00:09 +0200 |
commit | 182e27f2dbf13574e43e30ef1937237d4b9be21f (patch) | |
tree | 238be544affb789fab1257f0cac89f7abdbe7999 /src/main/java/at/hannibal2/skyhanni | |
parent | b54aa9d4182fa8e3894fde25632b458b2ef4afa7 (diff) | |
download | skyhanni-182e27f2dbf13574e43e30ef1937237d4b9be21f.tar.gz skyhanni-182e27f2dbf13574e43e30ef1937237d4b9be21f.tar.bz2 skyhanni-182e27f2dbf13574e43e30ef1937237d4b9be21f.zip |
Do not show the same version number twice if it is correct
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java | 1 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/update/GuiOptionEditorUpdateCheck.kt | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java index 06c19a8a8..76eda7c64 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java @@ -96,7 +96,6 @@ public class SkyHanniMod { public static final String DEPENDENCIES = "after:notenoughupdates@[2.1.1,);"; - public static Features feature; public static RepoManager repo; 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 395975aa6..18620137b 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 @@ -43,9 +43,11 @@ class GuiOptionEditorUpdateCheck(option: ProcessedOption) : GuiOptionEditor(opti val widthRemaining = width - button.width - 10 GlStateManager.scale(2F, 2F, 1F) + val currentVersion = UpdateManager.getCurrentVersion() + val sameVersion = currentVersion.equals(nextVersion, true) TextRenderUtils.drawStringCenteredScaledMaxWidth( - "${if (UpdateManager.updateState == UpdateManager.UpdateState.NONE) GREEN else RED}${UpdateManager.getCurrentVersion()}" + - if (nextVersion != null) "➜ ${GREEN}${nextVersion}" else "", + "${if (UpdateManager.updateState == UpdateManager.UpdateState.NONE) GREEN else RED}$currentVersion" + + if (nextVersion != null && !sameVersion) "➜ ${GREEN}${nextVersion}" else "", fr, widthRemaining / 4F, 10F, |