From f8c0468e96cf00006e07a893f7fe78530a0d225f Mon Sep 17 00:00:00 2001 From: rainxchzed Date: Thu, 30 Apr 2026 19:33:35 +0500 Subject: [PATCH] Update InstallPolicy logic in DetailsViewModel Adjusts the `InstallPolicy` selection logic to prioritize `InstallPolicy.AlwaysInstall` for non-Android platforms and the Shizuku installer. Other Android installation types continue to use `InstallPolicy.InstallWhileForeground`. --- .../zed/rainxch/details/presentation/DetailsViewModel.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/feature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/DetailsViewModel.kt b/feature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/DetailsViewModel.kt index 9dc5f55a2..c3eeecee7 100644 --- a/feature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/DetailsViewModel.kt +++ b/feature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/DetailsViewModel.kt @@ -1489,11 +1489,11 @@ class DetailsViewModel( } catch (e: Exception) { InstallerType.DEFAULT } - val policy = - when (installerType) { - InstallerType.SHIZUKU -> InstallPolicy.AlwaysInstall - InstallerType.DEFAULT -> InstallPolicy.InstallWhileForeground + when { + platform != Platform.ANDROID -> InstallPolicy.AlwaysInstall + installerType == InstallerType.SHIZUKU -> InstallPolicy.AlwaysInstall + else -> InstallPolicy.InstallWhileForeground } downloadOrchestrator.enqueue(