AttachmentPickerMenu

fun AttachmentPickerMenu(attachmentsPickerViewModel: AttachmentsPickerViewModel, composerViewModel: MessageComposerViewModel)

A container component that manages the attachment picker's visibility and animations.

This composable wraps AttachmentPicker and handles:

  • Animated expand/collapse transitions when showing/hiding the picker

  • Keyboard coordination (hides keyboard when picker opens if configured)

  • Auto-dismiss when keyboard appears

  • Height configuration based on picker type (system vs in-app)

  • Integration between the attachment picker and message composer

The picker visibility is controlled by AttachmentsPickerViewModel.isPickerVisible. Toggle it using AttachmentsPickerViewModel.setPickerVisible.

This component is typically used within ChannelScreen and handles the complete flow of:

  1. Displaying the attachment picker when triggered

  2. Managing attachment selection

  3. Adding selected attachments to the message composer

  4. Creating polls when the poll action is triggered

  5. Inserting commands when selected

Parameters

attachmentsPickerViewModel

The AttachmentsPickerViewModel that controls picker visibility, manages attachment loading, and tracks selection state.

composerViewModel

The MessageComposerViewModel that receives selected attachments and handles poll creation and command insertion.