Make onSendMessage parameter not nullable

This commit is contained in:
Benoit Marty
2026-08-13 09:21:31 +02:00
parent fb82291f0a
commit 8c8d232eac
2 changed files with 3 additions and 2 deletions
@@ -218,10 +218,10 @@ fun TextComposer(
placeholder = placeholder,
placeholderColor = ElementTheme.colors.textSecondary,
onTyping = onTyping,
onSendMessage = { if (canSendTextMessage) onSendMessage() },
onReceiveSuggestion = onReceiveSuggestion,
richTextEditorStyle = style,
onSelectRichContent = onSelectRichContent,
onSendMessage = { if (canSendTextMessage) onSendMessage() },
)
}
}
@@ -51,10 +51,10 @@ fun MarkdownTextInput(
placeholder: String,
placeholderColor: androidx.compose.ui.graphics.Color,
onTyping: (Boolean) -> Unit,
onSendMessage: () -> Unit,
onReceiveSuggestion: (Suggestion?) -> Unit,
richTextEditorStyle: RichTextEditorStyle,
onSelectRichContent: ((Uri) -> Unit)?,
onSendMessage: (() -> Unit)? = null,
) {
// Copied from io.element.android.wysiwyg.internal.utils.UriContentListener
class ReceiveUriContentListener(
@@ -217,6 +217,7 @@ internal fun MarkdownTextInputPreview() {
placeholder = "Placeholder",
placeholderColor = ElementTheme.colors.textSecondary,
onTyping = {},
onSendMessage = {},
onReceiveSuggestion = {},
richTextEditorStyle = style,
onSelectRichContent = {},