-
public final class ChannelAttachmentsViewModel extends ViewModel
ViewModel for managing channel attachments and their actions.
-
-
Method Summary
Modifier and Type Method Description final StateFlow<ChannelAttachmentsViewState>getState()final SharedFlow<ChannelAttachmentsViewEvent>getEvents()final UnitonViewAction(ChannelAttachmentsViewAction action)-
Methods inherited from class io.getstream.chat.android.compose.viewmodel.channel.ChannelAttachmentsViewModel
addCloseable, addCloseable, addCloseable, getCloseable -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ChannelAttachmentsViewModel
ChannelAttachmentsViewModel(String cid, List<String> attachmentTypes, Function1<Attachment, Boolean> localFilter, Function1<ViewModel, ChannelAttachmentsViewController> controllerProvider)
- Parameters:
cid- The full channel identifier (e.g., "messaging:123").attachmentTypes- The list of attachment types (e.g., "image", "file").localFilter- A function to filter attachments locally after fetching.controllerProvider- The provider for ChannelAttachmentsViewController.
-
-
Method Detail
-
getState
final StateFlow<ChannelAttachmentsViewState> getState()
-
getEvents
final SharedFlow<ChannelAttachmentsViewEvent> getEvents()
-
onViewAction
final Unit onViewAction(ChannelAttachmentsViewAction action)
-
-
-
-