onQueryMoreFeeds method
void
onQueryMoreFeeds(
- PaginationResult<
FeedData> result, - QueryConfiguration<
FeedData> queryConfig
Handles the result of a query for more feeds.
Implementation
void onQueryMoreFeeds(
PaginationResult<FeedData> result,
QueryConfiguration<FeedData> queryConfig,
) {
_queryConfig = queryConfig;
// Merge the new feeds with the existing ones (keeping the sort order)
final updatedFeeds = state.feeds.merge(
result.items,
key: (it) => it.fid.rawValue,
compare: feedsSort.compare,
);
state = state.copyWith(
feeds: updatedFeeds,
pagination: result.pagination,
);
}