mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-21 22:15:40 +00:00
fix(artists): restore infinite scroll after initial library load (#709)
* fix(artists): attach infinite-scroll observer when sentinel mounts The Artists page only renders the bottom sentinel after getArtists finishes. The hook subscribed in an effect keyed on loadMore; unlike Albums, that callback does not depend on loading, so the observer never attached after the first paint. Use a callback ref and observe against the main scroll viewport (#app-main-scroll-viewport). * docs: changelog for Artists infinite scroll fix (PR #709)
This commit is contained in:
@@ -284,6 +284,12 @@ Foundational work: faster reviews, narrower diffs, and a safety net under the pa
|
||||
|
||||
## Fixed
|
||||
|
||||
### Artists — infinite scroll after first page
|
||||
|
||||
**By [@cucadmuh](https://github.com/cucadmuh), PR [#709](https://github.com/Psychotoxical/psysonic/pull/709)**
|
||||
|
||||
* The **Artists** page only mounts the bottom **`IntersectionObserver`** sentinel after **`getArtists`** finishes, while **`useArtistsInfiniteScroll`** subscribed in an effect keyed only on **`loadMore`**. Unlike **Albums**, that callback does not depend on **`loading`**, so its identity did not change when the sentinel first appeared — the observer never attached and **`visibleCount`** never grew past the first batch. The hook now uses a **callback ref** (subscribe on mount, disconnect on unmount) and sets **`root`** to **`#app-main-scroll-viewport`** so intersection matches the real scroll container.
|
||||
|
||||
### Playback — track no longer clipped at the end with gapless and crossfade off
|
||||
|
||||
**By [@Psychotoxical](https://github.com/Psychotoxical), PR [#708](https://github.com/Psychotoxical/psysonic/pull/708)**
|
||||
|
||||
Reference in New Issue
Block a user