Use the material3 pull-to-refresh instead of accompanist (3 commits: swap LoadingContent to PullToRefreshBox; drop the accompanist dependency and declare androidx.appcompat explicitly since it was only coming in transitively; remove the leftover ScrollChildSwipeRefreshLayout styleable) - #1078
Open
rootkiller6788 wants to merge 3 commits into
Open
rootkiller6788 wants to merge 3 commits into
rootkiller6788 wants to merge 3 commits into
Conversation
The add/edit screen was moved to PullToRefreshBox during the M3 pass but ComposeUtils was left on Accompanist's SwipeRefresh, so the tasks, statistics and task detail screens were still using the deprecated one. Same behaviour: the indicator follows the loading flag and onRefresh is passed straight through.
Nothing imports com.google.accompanist any more now that LoadingContent uses PullToRefreshBox, so the last two entries go too. The three remaining catalog aliases (flowlayout, systemuicontroller, testharness) were already unused. One catch: accompanist-appcompat-theme was the only thing pulling androidx.appcompat onto the classpath, and the app theme in styles.xml is Theme.AppCompat.Light.NoActionBar. So appcompat gets declared directly instead of being borrowed from a library we no longer use. The catalog already had the alias pointing at 1.7.0.
It declares a refreshing attr for a custom SwipeRefreshLayout subclass from the old Views version of the app. That class and the layouts are long gone, and nothing references the styleable, so the whole file goes.
rootkiller6788
requested review from
JoseAlcerreca and
dturner
as code owners
September 16, 2026 16:00
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.
The tasks, statistics and task detail screens pull to refresh through Accompanist's SwipeRefresh, via LoadingContent in util/ComposeUtils.kt. The add/edit screen got moved to the material3 PullToRefreshBox back in the M3 pass, so this is the last Accompanist usage left in the app.
I swapped LoadingContent over to PullToRefreshBox. The signature is unchanged, so the three callers don't need touching, and the refresh semantics are the same: the indicator follows the loading flag and onRefresh is passed straight through. Only the indicator itself looks different now, since PullToRefreshBox overlays it instead of laying it out.
Then dropped the accompanist dependency (and the catalog entries for it, including three aliases that were already unused).
One thing worth flagging there: accompanist-appcompat-theme was the only thing putting androidx.appcompat on the classpath, and the app theme in values/styles.xml extends Theme.AppCompat.Light.NoActionBar. So removing it on its own would break resource linking. I declared androidx.appcompat directly instead - the version catalog already had the alias at 1.7.0, it just wasn't referenced anywhere. Better to have it explicit than borrowed from a library we don't use.
Also deleted values/attrs.xml. It only declares a
refreshingattr for ScrollChildSwipeRefreshLayout, a custom view from the old Views version of the app - neither the class nor any layout exists any more, and nothing references the styleable.I left the empty state alone, so it still doesn't offer a pull to refresh. That's #916 and it has its own PR, didn't want to bundle it in here.
How I checked it: I don't have an Android SDK on this machine, so I verified offline rather than by running the tests. Pulled compose-bom 2024.12.01's pom to confirm it resolves material3 1.3.1, then javap'd the real PullToRefreshBox signature out of the material3-android aar to make sure the parameter names/order I used line up. Grepped for any remaining accompanist reference (only build files and ComposeUtils had them) and for ScrollChildSwipeRefreshLayout (only attrs.xml). The appcompat transitive dependency I confirmed from the actual accompanist-appcompat-theme-0.36.0.pom.
A CI run of the tasks / statistics / task detail screen tests would be the real confirmation - I couldn't do that here.