feat: implement per-app pre-release update settings#368
Conversation
- Add localized strings for `bottom_nav_profile_tweaks` and `tweaks_title`. - Provide translations for Bengali, Hindi, Italian, Spanish, Arabic, French, Polish, Russian, Japanese, Korean, Turkish, and Chinese (Simplified).
- Add `includePreReleases` column to `installed_apps` table in database version 8. - Implement database migration `MIGRATION_7_8` to support the new schema change. - Update `InstalledApp` domain and UI models to include the pre-release preference. - Add a "Pre-releases" toggle switch to the app details UI in the apps list. - Implement `OnTogglePreReleases` action in `AppsViewModel` to update settings and trigger immediate update checks. - Refactor `AppsRepository` and `InstalledAppsRepository` to pass the `includePreReleases` flag when fetching the latest releases from GitHub. - Add localized strings for "Pre-releases" in Arabic, Turkish, Bengali, Hindi, Italian, Spanish, French, Polish, Russian, Japanese, Korean, and Chinese (Simplified). - Remove unnecessary `TweaksRepository` dependency from `InstalledAppsRepositoryImpl` and `SharedModule`.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (33)
WalkthroughThis PR adds per-app pre-release inclusion toggle functionality, progressing the database schema from version 7 to 8 with a migration that adds an Changes
Sequence DiagramsequenceDiagram
actor User
participant UI as AppsScreen/AppItemCard
participant VM as AppsViewModel
participant AppRepo as AppsRepository
participant InstallRepo as InstalledAppsRepository
participant Database as AppDatabase
User->>UI: Toggle Pre-releases Switch
UI->>VM: OnTogglePreReleases(packageName, enabled)
VM->>InstallRepo: setIncludePreReleases(packageName, enabled)
InstallRepo->>Database: updateIncludePreReleases(packageName, enabled)
Database-->>InstallRepo: Success
VM->>InstallRepo: checkForUpdates(packageName)
InstallRepo->>AppRepo: getLatestRelease(owner, repo, includePreReleases=true)
AppRepo-->>InstallRepo: GithubRelease
InstallRepo-->>VM: Release fetched
VM->>UI: Update app state with new release
UI-->>User: Display updated release info
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
includePreReleasescolumn toinstalled_appstable in database version 8.MIGRATION_7_8to support the new schema change.InstalledAppdomain and UI models to include the pre-release preference.OnTogglePreReleasesaction inAppsViewModelto update settings and trigger immediate update checks.AppsRepositoryandInstalledAppsRepositoryto pass theincludePreReleasesflag when fetching the latest releases from GitHub.TweaksRepositorydependency fromInstalledAppsRepositoryImplandSharedModule.Summary by CodeRabbit
Release Notes
New Features
Chores