Repository navigation
Migration from 1.0.0 → 1.1.0: see MIGRATION.md.
Added
ACAnchoredDispatcher.reloadOlder/reloadNewer— seed each side of a
window around an anchor with a plainACPage. Each replaces its side's
items, takeshasMorefrom its own page, cancels that side's in-flight load
and discards a late answer as stale. A window is composed by the caller out
of the two seeds: the request count, their concurrency and the handling of a
one-sided failure stay outside the package.ACAnchoredDispatcher.isReloadingAny/reloadingAnyListenable— true while
either side is being seeded, and deliberately blind toloadOlder/
loadNewer, so an initial-load spinner does not flicker on scroll.ACAnchoredDispatcher.lastErrorAny/errorAnyListenable— the last error
held by either side; stays non-null while at least one side has one, so a
success on one side cannot hide a failure on the other.ACLoadingDispatcher.reloadingListenable— a reactive channel mirroring
isReloadingalone. UnlikeloadingListenable, which carries the derived
isReloading || isLoadingMore, it still fires when areloadstarts on top
of an in-flightloadMore. Available inACListDispatcherand
ACPageDispatchertoo.
Fixed
- A window around an anchor is now expressible at all.
loadAround
unconditionally cleared the older side, so after an around-load that side was
guaranteed empty whatever the loader returned; when the anchor was the last
item of a feed the window collapsed to a single element and the history sat
beyond the edge. lastResultOlder/lastResultNewerare populated right after the window is
seeded, because the seeds are real loads. The initial cursors are read from
the same members as every subsequent one —lastAroundis no longer needed
for that.retryOlder/retryNewernow repeat a seed as well as an edge load.- The per-side search strategy is neutralised inside
ACAnchoredDispatcher: a
non-empty query shorter than the defaultminLengthcarried inparams
would otherwise have turned a seed into a silent clear of the side.
Deprecated
Scheduled for removal in 2.0.0; behaviour is unchanged and existing code
keeps compiling.
ACAnchoredDispatcher.loadAround— usereloadOlder+reloadNewer.ACAnchoredPage<T>— useACPage<T>on each side. It carries a single list
and therefore cannot express a window around an anchor; its documentation
claimed otherwise and has been corrected.lastAround— uselastResultOlder/lastResultNewer.isLoadingAround— useisReloadingAny.loadingAroundListenable— usereloadingAnyListenable.lastErrorAround— uselastErrorAny.errorAroundListenable— useerrorAnyListenable.