Reduce main list flicker#125
Merged
Merged
Conversation
Use stable identity-based lazy item keys and stop forcing list refreshes for every app database change while sync is running. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bump version code and regenerate release baseline profiles for the open testing bundle. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Clarify submodule setup, local build inputs for worktrees, and Windows Gradle usage. Ignore the wt directory used for task worktrees. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…icker # Conflicts: # .github/copilot-instructions.md
Contributor
There was a problem hiding this comment.
Pull request overview
Stabilizes watchlist LazyColumn item keys to reduce flicker on refresh by making SectionItem.sectionKey deterministic (independent of content hash) and dropping the volatile listContext/dbAppsChange ingredients from item keys and the screen RefreshKey. DB-change-driven refreshes still occur via invalidatePagingSources() in the view model, so list freshness is preserved while unchanged rows are no longer recreated. Also bumps versionCode to 17006 as part of 1.7.0 release prep.
Changes:
- Make
SectionItem.sectionKeystable per-identity (header type, package name, row id) and droplistContextplumbing fromWatchListPage/WatchListand callers. - Remove
dbAppsChangefromWatchListScreen.RefreshKeyso DB ticks no longer trigger fullitems.refresh(). - Add
SectionItemTestcovering uniqueness/stability of section keys and bumpversionCodeto 17006.
Reviewed changes
Copilot reviewed 9 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/java/com/anod/appwatcher/watchlist/Section.kt | Replace hash-based section keys with stable per-type/per-app keys. |
| app/src/main/java/com/anod/appwatcher/watchlist/WatchListPage.kt | Drop listContext parameter and use sectionKey directly as Lazy item key. |
| app/src/main/java/com/anod/appwatcher/watchlist/WatchListScreen.kt | Remove listContext and dbAppsChange from RefreshKey. |
| app/src/main/java/com/anod/appwatcher/watchlist/MainScreen.kt | Stop passing listContext = "main". |
| app/src/main/java/com/anod/appwatcher/tags/TagWatchListScreen.kt | Stop passing listContext = "tag-...". |
| app/src/main/java/com/anod/appwatcher/installed/InstalledListScreen.kt | Stop passing listContext = "installed". |
| app/src/test/java/com/anod/appwatcher/watchlist/SectionItemTest.kt | New unit tests for section key uniqueness/stability. |
| app/build.gradle.kts | Bump versionCode to 17006. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tests