|
Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
|
Goal: a feed that (a) re-fetches from the top on pull-to-refresh, and (b) grows its visible window as the user scrolls (infinite scroll).
Two orthogonal pieces:
On refresh, is_loading flips true while the previous data stays visible (the Refreshing state of the synthesised Loadable<Feed> surface — bind feed.loadable for a single sum-type instead of four flags).
Back the visible rows with a PagedList and grow the window when the user nears the bottom:
page_size() / page_index() are Property<std::size_t>& — setting either re-windows and emits the minimal Insert/Remove diff, so the table animates in only the newly-visible rows rather than reloading.
The usual shape: an AsyncResource (or a paginated fetch loop) appends fetched items into the ObservableList<Item> source; the PagedList windows it for the table; pull-to-refresh clears the source and re-fetches page 0. Each concern stays independently testable.