Fix: Remove invalid method parameters from UpdaterModule calls

- Line 86: Remove `isCustomUrlEnabled` reference (doesn't exist in UpdaterModule)
- Line 92: Remove `showUpdateDialog = false` parameter from `downloadScript()` call
- Line 96: Remove `showUpdateDialog = true` parameter from `downloadScript()` call

The `UpdaterModule.downloadScript()` method only accepts an optional `activity` parameter, not `showUpdateDialog`.
The logic has been simplified to check only if the main script exists.
This commit is contained in:
OTKUSteyler 2026-08-26 16:15:12 +02:00
parent 7df631b799
commit fd84dd0320

View file

@ -83,17 +83,14 @@ object HookScriptLoaderModule : Module() {
runBlocking {
val ready = async { HookStateHolder.readyDeferred.join() }
val isCustomUrl = UpdaterModule.isCustomUrlEnabled
if (!mainScript.exists() || isCustomUrl) {
val reason = if (isCustomUrl) "Custom URL enabled" else "Main script does not exist"
Log.i("$reason, downloading before load...")
val download =
async { UpdaterModule.downloadScript(showUpdateDialog = false).join() }
if (!mainScript.exists()) {
Log.i("Main script does not exist, downloading before load...")
val download = async { UpdaterModule.downloadScript().join() }
awaitAll(ready, download)
} else {
Log.i("Main script exists, updating in background...")
UpdaterModule.downloadScript(showUpdateDialog = true)
UpdaterModule.downloadScript()
ready.await()
}
}