mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 03:39:19 +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 result Whether the extension was installed or not.
|
||||
*/
|
||||
fun cancelInstallation(downloadId: Long, result: Boolean) {
|
||||
fun setInstallationResult(downloadId: Long, result: Boolean) {
|
||||
installer.setInstallationResult(downloadId, result)
|
||||
}
|
||||
|
||||
|
@ -79,18 +79,18 @@ class ExtensionInstallActivity : Activity() {
|
||||
finish()
|
||||
}
|
||||
PackageInstaller.STATUS_SUCCESS -> {
|
||||
extensionManager.cancelInstallation(downloadId, true)
|
||||
extensionManager.setInstallationResult(downloadId, true)
|
||||
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 -> {
|
||||
extensionManager.cancelInstallation(downloadId, false)
|
||||
extensionManager.setInstallationResult(downloadId, false)
|
||||
if (status != PackageInstaller.STATUS_FAILURE_ABORTED) {
|
||||
toast(R.string.could_not_install_extension)
|
||||
}
|
||||
finish()
|
||||
}
|
||||
else -> {
|
||||
extensionManager.cancelInstallation(downloadId, false)
|
||||
extensionManager.setInstallationResult(downloadId, false)
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user