MentionListViewModel

class MentionListViewModel(sort: QuerySorter<Message>? = null, controllerProvider: ViewModel.() -> MentionListController = { MentionListController(viewModelScope, sort) }) : ViewModel

ViewModel class responsible for managing the MentionListState and actions of mention list.

Parameters

sort

The sorting options for the messages.

controllerProvider

The provider for MentionListController which handles the business logic of the mention list.

Constructors

Link copied to clipboard
constructor(sort: QuerySorter<Message>? = null, controllerProvider: ViewModel.() -> MentionListController = { MentionListController(viewModelScope, sort) })

Properties

Link copied to clipboard

One shot error events.

Link copied to clipboard

The current mention list state.

Functions

Link copied to clipboard
fun loadMore()

Loads more mentions if there are more to load.

Inherited functions

Link copied to clipboard
open fun addCloseable(closeable: AutoCloseable)
fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
@JvmName(name = "bind")
fun MentionListViewModel.bindView(view: MentionListView, lifecycleOwner: LifecycleOwner)

Binds MentionListView with MentionListViewModel, updating the view's state based on data provided by the ViewModel and propagating view events to the ViewModel as needed.

Link copied to clipboard