-
public final class ChannelListHeaderKt
-
-
Method Summary
Modifier and Type Method Description final static UnitChannelListHeader(Modifier modifier, String title, User currentUser, ConnectionState connectionState, Function1<User, Unit> onAvatarClick, Function0<Unit> onHeaderActionClick, Function1<RowScope, Unit> leadingContent, Function1<RowScope, Unit> centerContent, Function1<RowScope, Unit> trailingContent)A clean, decoupled UI element that doesn't rely on ViewModels or our custom architecture setup. -
-
Method Detail
-
ChannelListHeader
@Composable() final static Unit ChannelListHeader(Modifier modifier, String title, User currentUser, ConnectionState connectionState, Function1<User, Unit> onAvatarClick, Function0<Unit> onHeaderActionClick, Function1<RowScope, Unit> leadingContent, Function1<RowScope, Unit> centerContent, Function1<RowScope, Unit> trailingContent)
A clean, decoupled UI element that doesn't rely on ViewModels or our custom architecture setup. This allows the user to fully govern how the ChannelListHeader behaves, by passing in all the data that's required to display it and drive its actions.
- Parameters:
modifier- Modifier for styling.title- The title to display, when the network is available.currentUser- The currently logged in user, to load its image in the avatar.connectionState- The state of WS connection used to switch between the title and the network loading view.onAvatarClick- Action handler when the user taps on an avatar.onHeaderActionClick- Action handler when the user taps on the header action.leadingContent- Custom composable that allows the user to replace the default header leading content.centerContent- Custom composable that allows the user to replace the default header center content.trailingContent- Custom composable that allows the user to replace the default leading content.
-
-
-
-