fix(PatchingModel): properly launch installation
This commit is contained in:
parent
67decbe8e5
commit
78f5220882
1 changed files with 8 additions and 3 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue