bindViewDefaults
Function which connects MessageComposerView to MessageComposerViewModel. As a result the view renders the state delivered by the ViewModel, and the ViewModel intercepts the user's actions automatically. The main difference with bindView is that listeners in this function do not override the default behaviour.
Parameters
An instance of MessageComposerView to bind to the ViewModel.
LifecycleOwner of Activity or Fragment hosting the MessageComposerView
A lambda function to build a new message.
Click listener for the send message button.
Text change listener invoked each time after text was changed.
Selection listener invoked when attachments are selected.
Click listener for the remove attachment button.
Selection listener invoked when a poll is submitted.
Selection listener invoked when a mention suggestion item is selected.
Selection listener invoked when a command suggestion item is selected.
Selection listener for the "also send to channel" checkbox.
Click listener for the dismiss action button.
Click listener for the pick commands button.
Click listener invoked when suggestion popup is dismissed.
Hold listener invoked when the microphone button gets pressed down.
Lock listener invoked when the audio recording gets locked.
Cancel listener invoked when the audio recording gets cancelled.
Release listener invoked when the microphone button gets released.
Click listener for the audio recording delete button.
Click listener for the audio recording stop button.
Click listener for the audio recording playback button.
Click listener for the audio recording complete button.
Drag start listener invoked when the audio slider starts being dragged.
Drag stop listener invoked when the audio slider stops being dragged.