mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Make onSendMessage parameter not nullable
This commit is contained in:
+1
-1
@@ -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() },
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -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 = {},
|
||||
|
||||
Reference in New Issue
Block a user