aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorEmpa <42304516+ItsEmpa@users.noreply.github.com>2024-04-29 13:25:54 +0200
committerGitHub <noreply@github.com>2024-04-29 13:25:54 +0200
commita338da23c43719a20da756151bb8de10c8ad8e79 (patch)
tree75f31e5264225ba1ba18657636cb99a36e73f435 /src/main/java/at
parent648b87aced563662c71c8a6b8214d7bd825d03e8 (diff)
downloadskyhanni-a338da23c43719a20da756151bb8de10c8ad8e79.tar.gz
skyhanni-a338da23c43719a20da756151bb8de10c8ad8e79.tar.bz2
skyhanni-a338da23c43719a20da756151bb8de10c8ad8e79.zip
Fix: Updater wrong version (#1590)
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
index 0ba4da096..c3d04076a 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
@@ -601,7 +601,7 @@ object Commands {
else -> currentStream
}
- if (updateStream == UpdateStream.BETA && (currentStream != UpdateStream.BETA || UpdateManager.isCurrentlyBeta())) {
+ if (updateStream == UpdateStream.BETA && (currentStream != UpdateStream.BETA || !UpdateManager.isCurrentlyBeta())) {
ChatUtils.clickableChat(
"Are you sure you want to switch to beta? These versions may be less stable.",
onClick = {
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 685a411b1..a75d88af7 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
@@ -76,7 +76,8 @@ object UpdateManager {
logger.log("Reset update state")
}
- fun checkUpdate(forceDownload: Boolean = false, updateStream: UpdateStream = config.updateStream.get()) {
+ fun checkUpdate(forceDownload: Boolean = false, forcedUpdateStream: UpdateStream = config.updateStream.get()) {
+ var updateStream = forcedUpdateStream
if (updateState != UpdateState.NONE) {
logger.log("Trying to perform update check while another update is already in progress")
return
@@ -85,6 +86,7 @@ object UpdateManager {
val currentStream = config.updateStream.get()
if (currentStream != UpdateStream.BETA && (updateStream == UpdateStream.BETA || isCurrentlyBeta())) {
config.updateStream = Property.of(UpdateStream.BETA)
+ updateStream = UpdateStream.BETA
}
activePromise = context.checkUpdate(updateStream.stream)
.thenAcceptAsync({