Skip to content

Update InstallPolicy logic in DetailsViewModel#472

Merged
rainxchzed merged 1 commit into
mainfrom
desktop-open-explorer
Apr 30, 2026
Merged

Update InstallPolicy logic in DetailsViewModel#472
rainxchzed merged 1 commit into
mainfrom
desktop-open-explorer

Conversation

@rainxchzed
Copy link
Copy Markdown
Member

@rainxchzed rainxchzed commented Apr 30, 2026

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.

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Corrected installation behavior across platforms by refining how installation policies are determined based on device type.

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`.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 53a88b07-3428-4df6-a4bc-ac5348985aeb

📥 Commits

Reviewing files that changed from the base of the PR and between 83acf68 and f8c0468.

📒 Files selected for processing (1)
  • feature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/DetailsViewModel.kt

Walkthrough

The install workflow's InstallPolicy determination logic now considers both the installer type and runtime platform. Non-Android platforms are set to InstallPolicy.AlwaysInstall, while Android uses AlwaysInstall for SHIZUKU and defaults to InstallWhileForeground for other cases.

Changes

Cohort / File(s) Summary
Platform-Aware Install Policy
feature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/DetailsViewModel.kt
Modified InstallPolicy determination logic to conditionally check platform in addition to installer type, forcing AlwaysInstall on non-Android platforms while maintaining Android's existing behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

A rabbit hops through platforms bright,
Where policies now shine just right,
Android knows its ways of old,
While others grasp a stronger hold,
AlwaysInstall—a steadfast friend! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: updating InstallPolicy logic in DetailsViewModel, which is the core modification described in the PR objectives and file summary.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch desktop-open-explorer

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@rainxchzed rainxchzed merged commit 181b15c into main Apr 30, 2026
1 check passed
@rainxchzed rainxchzed deleted the desktop-open-explorer branch April 30, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant