-
public final class ThreadListKt
-
-
Method Summary
Modifier and Type Method Description final static UnitThreadList(ThreadListViewModel viewModel, Modifier modifier, User currentUser, Function0<Unit> onUnreadThreadsBannerClick, Function1<Thread, Unit> onThreadClick, Function0<Unit> onLoadMore, Function1<Integer, Unit> unreadThreadsBanner, Function1<Thread, Unit> itemContent, Function0<Unit> emptyContent, Function0<Unit> loadingContent, Function0<Unit> loadingMoreContent)Composable rendering a paginated list of threads. final static UnitThreadList(ThreadListState state, Modifier modifier, User currentUser, Function0<Unit> onUnreadThreadsBannerClick, Function1<Thread, Unit> onThreadClick, Function0<Unit> onLoadMore, Function1<Integer, Unit> unreadThreadsBanner, Function1<Thread, Unit> itemContent, Function0<Unit> emptyContent, Function0<Unit> loadingContent, Function0<Unit> loadingMoreContent)Composable rendering a paginated list of threads. -
-
Method Detail
-
ThreadList
@Composable() final static Unit ThreadList(ThreadListViewModel viewModel, Modifier modifier, User currentUser, Function0<Unit> onUnreadThreadsBannerClick, Function1<Thread, Unit> onThreadClick, Function0<Unit> onLoadMore, Function1<Integer, Unit> unreadThreadsBanner, Function1<Thread, Unit> itemContent, Function0<Unit> emptyContent, Function0<Unit> loadingContent, Function0<Unit> loadingMoreContent)
Composable rendering a paginated list of threads. Optionally, it renders a banner informing about new threads/thread messages outside of the loaded pages of threads.
- Parameters:
viewModel- The ThreadListViewModel handling the loading of the threads.modifier- Modifier instance for general styling.currentUser- The currently logged User, used for formatting the message in the thread preview.onUnreadThreadsBannerClick- Action invoked when the user clicks on the "Unread threads" banner.onThreadClick- Action invoked when the usr clicks on a thread item in the list.onLoadMore- Action invoked when the current thread page was scrolled to the end, and a next page should be loaded.unreadThreadsBanner- Composable rendering the "Unread threads" banner on the top of the list.itemContent- Composable rendering each Thread item in the list.emptyContent- Composable shown when there are no threads to display.loadingContent- Composable shown during the initial loading of the threads.loadingMoreContent- Composable shown at the bottom of the list during the loading of more threads (pagination).
-
ThreadList
@Composable() final static Unit ThreadList(ThreadListState state, Modifier modifier, User currentUser, Function0<Unit> onUnreadThreadsBannerClick, Function1<Thread, Unit> onThreadClick, Function0<Unit> onLoadMore, Function1<Integer, Unit> unreadThreadsBanner, Function1<Thread, Unit> itemContent, Function0<Unit> emptyContent, Function0<Unit> loadingContent, Function0<Unit> loadingMoreContent)
Composable rendering a paginated list of threads. Optionally, it renders a banner informing about new threads/thread messages outside of the loaded pages of threads.
- Parameters:
state- The ThreadListState holding the current thread list state.modifier- Modifier instance for general styling.currentUser- The currently logged User, used for formatting the message in the thread preview.onUnreadThreadsBannerClick- Action invoked when the user clicks on the "Unread threads" banner.onThreadClick- Action invoked when the usr clicks on a thread item in the list.onLoadMore- Action invoked when the current thread page was scrolled to the end, and a next page should be loaded.unreadThreadsBanner- Composable rendering the "Unread threads" banner on the top of the list.itemContent- Composable rendering each Thread item in the list.emptyContent- Composable shown when there are no threads to display.loadingContent- Composable shown during the initial loading of the threads.loadingMoreContent- Composable shown at the bottom of the list during the loading of more threads (pagination).
-
-
-
-