feat: custom game import as steam based on PrefManager toggle in Settings#1531
feat: custom game import as steam based on PrefManager toggle in Settings#1531phobos665 wants to merge 7 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds a persisted boolean preference ChangesCustom Game Steam Import Preference
Sequence Diagram(s)sequenceDiagram
participant SettingsUI as SettingsGroupInterface
participant Pref as PrefManager
participant Scanner as CustomGameScanner
participant Steam as SteamService
SettingsUI->>Pref: set importCustomGameAsSteamGame = true/false
Scanner->>Pref: read importCustomGameAsSteamGame during scan
Scanner->>Steam: if Pref && Steam.instance != null -> perform Steam lookup/import
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@app/src/main/java/app/gamenative/ui/screen/settings/SettingsGroupInterface.kt`:
- Around line 421-423: Replace the hardcoded Modifier.background(Color.Cyan)
used on the settings group (the call that also passes title = { Text(text =
stringResource(R.string.settings_interface_custom_games)) }) with a theme-driven
or transparent background; either remove the background modifier entirely so the
group inherits surrounding styling or use
Modifier.background(MaterialTheme.colorScheme.surfaceVariant) /
Modifier.background(Color.Transparent) to preserve theming and readability
across themes.
- Around line 427-429: The subtitle currently duplicates the title in the
composable (title = { Text(text =
stringResource(R.string.settings_interface_custom_game_import_as_steam)) },
subtitle = { ... }) creating UI noise; update the subtitle in
SettingsGroupInterface.kt — referencing the same setting state
importCustomGameAsSteamGame — to either remove the subtitle lambda entirely or
replace it with a distinct explanatory string resource (e.g.
R.string.settings_interface_custom_game_import_as_steam_subtitle) that clarifies
the behavior, and ensure the subtitle Text uses stringResource(...) for
localization.
In `@app/src/main/res/values/strings.xml`:
- Line 946: Update the string resource named
settings_interface_custom_game_import_as_steam to use the plural form for
clarity; change the value from "Import custom games as Steam game" to "Import
custom games as Steam games" so the label correctly reflects multiple games.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 915d1a8c-8dfe-4537-ba8e-b4e1b7da61bb
📒 Files selected for processing (18)
app/src/main/java/app/gamenative/PrefManager.ktapp/src/main/java/app/gamenative/ui/screen/settings/SettingsGroupInterface.ktapp/src/main/java/app/gamenative/utils/CustomGameScanner.ktapp/src/main/res/values-da/strings.xmlapp/src/main/res/values-de/strings.xmlapp/src/main/res/values-es/strings.xmlapp/src/main/res/values-fr/strings.xmlapp/src/main/res/values-it/strings.xmlapp/src/main/res/values-ja/strings.xmlapp/src/main/res/values-ko/strings.xmlapp/src/main/res/values-pl/strings.xmlapp/src/main/res/values-pt-rBR/strings.xmlapp/src/main/res/values-ro/strings.xmlapp/src/main/res/values-ru/strings.xmlapp/src/main/res/values-uk/strings.xmlapp/src/main/res/values-zh-rCN/strings.xmlapp/src/main/res/values-zh-rTW/strings.xmlapp/src/main/res/values/strings.xml
There was a problem hiding this comment.
4 issues found across 18 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Description
Updated the settings so that we can toggle/untoggle importing custom games as Steam games.
Recording
Type of Change
Checklist
#code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.CONTRIBUTING.md.Summary by cubic
Adds a Settings toggle to import custom games as Steam games (off by default). When enabled, the scanner maps matching folders to Steam entries.
New Features
importCustomGameAsSteamGameinPrefManagerand a toggle under Custom Games in Settings.CustomGameScannerto link custom games to Steam only when the toggle is on.Bug Fixes
Written for commit e76fb3f. Summary will update on new commits.
Summary by CodeRabbit
New Features
Localization