diff options
author | Empa <42304516+ItsEmpa@users.noreply.github.com> | 2024-04-29 13:25:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-29 13:25:54 +0200 |
commit | a338da23c43719a20da756151bb8de10c8ad8e79 (patch) | |
tree | 75f31e5264225ba1ba18657636cb99a36e73f435 /src/main/java/at/hannibal2 | |
parent | 648b87aced563662c71c8a6b8214d7bd825d03e8 (diff) | |
download | skyhanni-a338da23c43719a20da756151bb8de10c8ad8e79.tar.gz skyhanni-a338da23c43719a20da756151bb8de10c8ad8e79.tar.bz2 skyhanni-a338da23c43719a20da756151bb8de10c8ad8e79.zip |
Fix: Updater wrong version (#1590)
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt | 4 |
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({ |