Skip to content

Commit

Permalink
refactor: adapt update checker to new versions naming rule
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSkidder committed Aug 24, 2024
1 parent ea576c4 commit 1a0b549
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions shared/java/top/fpsmaster/FPSMaster.kt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class FPSMaster {
Logger.info("Initialized")
}

private fun initializeModules(){
private fun initializeModules() {
moduleManager.init()
submitter.init()
}
Expand All @@ -114,11 +114,9 @@ class FPSMaster {
updateFailed = true
return@runnable
}
val version = CLIENT_VERSION.replace("v".toRegex(), "").replace("\\.".toRegex(), "").toInt()
val newVersion = s.replace("v".toRegex(), "").replace("\\.".toRegex(), "").toInt()
if (s.isNotEmpty()) {
latest = s
isLatest = version >= newVersion
isLatest = CLIENT_VERSION != s
}
}
}
Expand Down Expand Up @@ -219,7 +217,7 @@ class FPSMaster {
try {
Class.forName("net.fabricmc.devlaunchinjector.Main")
development = true
}catch (e: Throwable){
} catch (e: Throwable) {
// ignored
}
}
Expand Down

0 comments on commit 1a0b549

Please sign in to comment.