mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-04-30 05:54:26 +02:00
fix: show install button when installation has been cancelled
This commit is contained in:
parent
067020f38f
commit
71b73a3b42
@ -108,14 +108,19 @@ class UpdateViewModel(
|
|||||||
val extra =
|
val extra =
|
||||||
intent.getStringExtra(InstallService.EXTRA_INSTALL_STATUS_MESSAGE)!!
|
intent.getStringExtra(InstallService.EXTRA_INSTALL_STATUS_MESSAGE)!!
|
||||||
|
|
||||||
if (pmStatus == PackageInstaller.STATUS_SUCCESS) {
|
when(pmStatus) {
|
||||||
|
PackageInstaller.STATUS_SUCCESS -> {
|
||||||
app.toast(app.getString(R.string.install_app_success))
|
app.toast(app.getString(R.string.install_app_success))
|
||||||
state = State.SUCCESS
|
state = State.SUCCESS
|
||||||
} else {
|
}
|
||||||
state = State.FAILED
|
PackageInstaller.STATUS_FAILURE_ABORTED -> {
|
||||||
// TODO: handle install fail with a popup
|
state = State.CAN_INSTALL
|
||||||
installError = extra
|
}
|
||||||
|
else -> {
|
||||||
app.toast(app.getString(R.string.install_app_fail, extra))
|
app.toast(app.getString(R.string.install_app_fail, extra))
|
||||||
|
installError = extra
|
||||||
|
state = State.FAILED
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user