Package 

Class AttachmentsPickerViewModel


  • 
    public final class AttachmentsPickerViewModel
    extends ViewModel
                        

    ViewModel for the attachment picker. Drives picker tab state, device storage browsing, and the isSelected checkmarks shown in attachments.

    Note: attachments reflects only the checkmark selection, not the full attachment list staged for the message. The composer attachment list is owned by MessageComposerViewModel.

    The active tab and checkmark selection survive process death (e.g. "Don't keep activities"). Checkmarks are not reset on hide — they persist until the session is explicitly consumed (e.g. after a message is sent, a poll is created, or a command is selected).

    • Constructor Detail

      • AttachmentsPickerViewModel

        AttachmentsPickerViewModel(AttachmentStorageHelper storageHelper, StateFlow<ChannelState> channelState, SavedStateHandle savedStateHandle)
        Parameters:
        storageHelper - Provides device storage queries and attachment conversion.
        channelState - Provides the current ChannelState for channel-specific configuration.
        savedStateHandle - Persists picker tab and selection state across process death.
      • AttachmentsPickerViewModel

        AttachmentsPickerViewModel(AttachmentStorageHelper storageHelper, StateFlow<ChannelState> channelState)
        Parameters:
        storageHelper - Provides device storage queries and attachment conversion.
        channelState - Provides the current ChannelState for channel-specific configuration.