Fix non-working app list chips and filters in Compose UI#10
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 20e515378f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| var allAppData by remember { mutableStateOf<List<AppData>>(emptyList()) } | ||
| var query by rememberSaveable { mutableStateOf("") } | ||
| var active by rememberSaveable { mutableStateOf(false) } | ||
| var filters by rememberSaveable { mutableStateOf(AppFilters()) } |
There was a problem hiding this comment.
Replace unsaveable filter state in rememberSaveable
filters is stored with rememberSaveable, but AppFilters is a plain data class and not Bundle-saveable (no Saver, Parcelable, or Serializable), so state saving during configuration change/background restore can throw IllegalArgumentException from the saveable state registry and crash the screen. This is introduced by the new filter state and is reproducible when Android tries to persist UI state (e.g., rotation or process recreation).
Useful? React with 👍 / 👎.
Motivation
Description
AppFiltersdata class and a persistedfiltersstate inDebloaterScreento hold chip selections.filteredAppDataderivation to apply the search query together with allAppFilters(systemOnly,userOnly,disabledOnly,uninstalledOnly).filtersandonFiltersChangetoDebloaterTopBarand added fourFilterChipcomponents (System,User,Disabled,Uninstalled) with interaction handlers that update the shared filters state.SystemandUserchips so enabling one disables the other while keeping the rest independent; changes are inapp/src/main/kotlin/com/dev/debloater/MainActivity.kt.Testing
./gradlew :app:compileDebugKotlin, which failed in this environment due to wrapper execution/permission issues.JAVA_HOME=... PATH=... gradle :app:compileDebugKotlin, which failed because the Android Gradle Plugincom.android.application:8.13.2could not be resolved from plugin repositories in this environment.gradle -vto confirm Gradle tooling version; no automated unit/UI tests were available or executed in this environment.Codex Task