From 982d3e644571deb39fa0119ead1f55031cfe7f6b Mon Sep 17 00:00:00 2001 From: Benjamin Halko Date: Sun, 4 Aug 2024 16:47:44 -0700 Subject: [PATCH] Set `isInstalling` to false when a root error occurs --- .../app/revanced/manager/ui/viewmodel/PatcherViewModel.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/app/revanced/manager/ui/viewmodel/PatcherViewModel.kt b/app/src/main/java/app/revanced/manager/ui/viewmodel/PatcherViewModel.kt index 856eff8e8d..8fa33cf8f0 100644 --- a/app/src/main/java/app/revanced/manager/ui/viewmodel/PatcherViewModel.kt +++ b/app/src/main/java/app/revanced/manager/ui/viewmodel/PatcherViewModel.kt @@ -366,10 +366,13 @@ class PatcherViewModel( rootInstaller.uninstall(packageName) } catch (_: Exception) { } + isInstalling = false } } } - } catch(_: Exception) { + } catch(e: Exception) { + Log.e(tag, "Failed to install", e) + app.toast(app.getString(R.string.install_app_fail, e.simpleMessage())) isInstalling = false } }