Keep onPostScroll under detekt ReturnCount limit #71

Merged
bvandeusen merged 1 commits from dev into main 2026-06-02 08:10:12 -04:00
Owner

Summary

  • The dismissed-latch added in #70 pushed NowPlayingScreen.onPostScroll to three early returns, tripping detekt's ReturnCount ≤ 2 ceiling on main.
  • Fold the NestedScrollSource.UserInput guard into the existing if/else if/else expression so the function returns at most twice — once for the latch bail, once for the normal path. Runtime behavior is identical.

Test plan

  • CI: detekt passes on dev
  • Drag-dismiss the NowPlaying screen — still latches on first threshold crossing, still consumes remaining drag

(The v2026.06.02 release APK already shipped with the correct latch behavior — the only thing this PR fixes is detekt style.)

## Summary - The dismissed-latch added in #70 pushed `NowPlayingScreen.onPostScroll` to three early returns, tripping detekt's `ReturnCount ≤ 2` ceiling on main. - Fold the `NestedScrollSource.UserInput` guard into the existing if/else if/else expression so the function returns at most twice — once for the latch bail, once for the normal path. Runtime behavior is identical. ## Test plan - [ ] CI: detekt passes on dev - [ ] Drag-dismiss the NowPlaying screen — still latches on first threshold crossing, still consumes remaining drag (The `v2026.06.02` release APK already shipped with the correct latch behavior — the only thing this PR fixes is detekt style.)
bvandeusen added 1 commit 2026-06-02 08:05:13 -04:00
fix(android): keep onPostScroll under detekt ReturnCount limit
android / Build + lint + test (push) Successful in 3m43s
1004b61159
The dismissed-latch added a third early return to onPostScroll —
detekt's ReturnCount ceiling is 2 per the project rule. Fold the
NestedScrollSource.UserInput guard into the existing if/else if/else
chain that branches on the drag direction. Behavior is identical;
the source check just becomes the first arm of the expression
rather than an early bail.
bvandeusen merged commit deb726a285 into main 2026-06-02 08:10:12 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/minstrel#71