ThreadsScreen

fun ThreadsScreen(viewModelFactory: ThreadsViewModelFactory = ThreadsViewModelFactory(query = QueryThreadsRequest()), title: String = stringResource(R.string.stream_compose_thread_list_header_title), onHeaderAvatarClick: () -> Unit = {}, onThreadClick: (Thread) -> Unit = {})

Default root Threads screen component, that provides the necessary ViewModel.

It can be used without most parameters for default behavior, that can be tweaked if necessary.

Parameters

viewModelFactory

The factory used to build the ThreadListViewModel.

title

Header title. Also drives the screen's paneTitle semantic, announced by TalkBack when the screen appears as a pane (e.g. an adaptive-layout pane or a Compose Navigation route).

onHeaderAvatarClick

Handle for when the user clicks on the header avatar.

onThreadClick

Handler for Thread item clicks.