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
val events: SharedFlow<MentionListEvent>

One shot events.

Link copied to clipboard
val state: StateFlow<MentionListState>

The current mention list state.

Functions

Link copied to clipboard
fun loadMore()

Loads more messages if there are more messages to load.

Link copied to clipboard
fun refresh()

Inherited functions

Link copied to clipboard
open fun addCloseable(closeable: AutoCloseable)
fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard