mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 04:59:17 +01:00
revert method name
This commit is contained in:
parent
6ba677f9a4
commit
a751f0b396
@ -261,7 +261,7 @@ class ExtensionManager(
|
|||||||
* @param downloadId The id of the download.
|
* @param downloadId The id of the download.
|
||||||
* @param result Whether the extension was installed or not.
|
* @param result Whether the extension was installed or not.
|
||||||
*/
|
*/
|
||||||
fun cancelInstallation(downloadId: Long, result: Boolean) {
|
fun setInstallationResult(downloadId: Long, result: Boolean) {
|
||||||
installer.setInstallationResult(downloadId, result)
|
installer.setInstallationResult(downloadId, result)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,18 +79,18 @@ class ExtensionInstallActivity : Activity() {
|
|||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
PackageInstaller.STATUS_SUCCESS -> {
|
PackageInstaller.STATUS_SUCCESS -> {
|
||||||
extensionManager.cancelInstallation(downloadId, true)
|
extensionManager.setInstallationResult(downloadId, true)
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
PackageInstaller.STATUS_FAILURE, PackageInstaller.STATUS_FAILURE_ABORTED, PackageInstaller.STATUS_FAILURE_BLOCKED, PackageInstaller.STATUS_FAILURE_CONFLICT, PackageInstaller.STATUS_FAILURE_INCOMPATIBLE, PackageInstaller.STATUS_FAILURE_INVALID, PackageInstaller.STATUS_FAILURE_STORAGE -> {
|
PackageInstaller.STATUS_FAILURE, PackageInstaller.STATUS_FAILURE_ABORTED, PackageInstaller.STATUS_FAILURE_BLOCKED, PackageInstaller.STATUS_FAILURE_CONFLICT, PackageInstaller.STATUS_FAILURE_INCOMPATIBLE, PackageInstaller.STATUS_FAILURE_INVALID, PackageInstaller.STATUS_FAILURE_STORAGE -> {
|
||||||
extensionManager.cancelInstallation(downloadId, false)
|
extensionManager.setInstallationResult(downloadId, false)
|
||||||
if (status != PackageInstaller.STATUS_FAILURE_ABORTED) {
|
if (status != PackageInstaller.STATUS_FAILURE_ABORTED) {
|
||||||
toast(R.string.could_not_install_extension)
|
toast(R.string.could_not_install_extension)
|
||||||
}
|
}
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
extensionManager.cancelInstallation(downloadId, false)
|
extensionManager.setInstallationResult(downloadId, false)
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user