fix(PatchingModel): properly launch installation

This commit is contained in:
rushiiMachine 2024-08-14 17:12:15 -07:00
parent 67decbe8e5
commit 78f5220882
No known key found for this signature in database
GPG key ID: DCBE5952BB3B6420

View file

@ -64,9 +64,14 @@ class PatchingScreenModel(
if (state.value !is PatchingScreenState.Success)
return
Intent(options.packageName)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.also(application::startActivity)
val launchIntent = application.packageManager
.getLaunchIntentForPackage(options.packageName)
if (launchIntent != null) {
application.startActivity(launchIntent)
} else {
application.showToast(R.string.launch_aliucord_fail)
}
}
fun copyDebugToClipboard() {