FeedState

data class FeedState(val availableTopics: List<Topic> = emptyList(), val selectedTopic: Topic = Topic.All, val feeds: Map<Topic, TopicFeed> = emptyMap(), val pendingBookmarkAction: PendingBookmarkAction? = null, val pendingBookmarkToggles: Set<String> = emptySet(), val isRefreshing: Boolean = false)

The feed is a 2D pager: horizontal across availableTopics, vertical (one card at a time) through each topic's posts. Each topic therefore keeps its own TopicFeed (posts, scroll position, pagination) so adjacent pager pages - which are composed simultaneously - show the right content.

Constructors

Link copied to clipboard
constructor(availableTopics: List<Topic> = emptyList(), selectedTopic: Topic = Topic.All, feeds: Map<Topic, TopicFeed> = emptyMap(), pendingBookmarkAction: PendingBookmarkAction? = null, pendingBookmarkToggles: Set<String> = emptySet(), isRefreshing: Boolean = false)

Properties

Link copied to clipboard
Link copied to clipboard

The feed for the currently selected topic (empty if not yet loaded).

Link copied to clipboard
Link copied to clipboard

Whether a pull-to-refresh of the selected topic is in flight.

Link copied to clipboard
Link copied to clipboard