mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Make onSendMessage parameter not nullable
This commit is contained in:
+1
-1
@@ -218,10 +218,10 @@ fun TextComposer(
|
|||||||
placeholder = placeholder,
|
placeholder = placeholder,
|
||||||
placeholderColor = ElementTheme.colors.textSecondary,
|
placeholderColor = ElementTheme.colors.textSecondary,
|
||||||
onTyping = onTyping,
|
onTyping = onTyping,
|
||||||
|
onSendMessage = { if (canSendTextMessage) onSendMessage() },
|
||||||
onReceiveSuggestion = onReceiveSuggestion,
|
onReceiveSuggestion = onReceiveSuggestion,
|
||||||
richTextEditorStyle = style,
|
richTextEditorStyle = style,
|
||||||
onSelectRichContent = onSelectRichContent,
|
onSelectRichContent = onSelectRichContent,
|
||||||
onSendMessage = { if (canSendTextMessage) onSendMessage() },
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -51,10 +51,10 @@ fun MarkdownTextInput(
|
|||||||
placeholder: String,
|
placeholder: String,
|
||||||
placeholderColor: androidx.compose.ui.graphics.Color,
|
placeholderColor: androidx.compose.ui.graphics.Color,
|
||||||
onTyping: (Boolean) -> Unit,
|
onTyping: (Boolean) -> Unit,
|
||||||
|
onSendMessage: () -> Unit,
|
||||||
onReceiveSuggestion: (Suggestion?) -> Unit,
|
onReceiveSuggestion: (Suggestion?) -> Unit,
|
||||||
richTextEditorStyle: RichTextEditorStyle,
|
richTextEditorStyle: RichTextEditorStyle,
|
||||||
onSelectRichContent: ((Uri) -> Unit)?,
|
onSelectRichContent: ((Uri) -> Unit)?,
|
||||||
onSendMessage: (() -> Unit)? = null,
|
|
||||||
) {
|
) {
|
||||||
// Copied from io.element.android.wysiwyg.internal.utils.UriContentListener
|
// Copied from io.element.android.wysiwyg.internal.utils.UriContentListener
|
||||||
class ReceiveUriContentListener(
|
class ReceiveUriContentListener(
|
||||||
@@ -217,6 +217,7 @@ internal fun MarkdownTextInputPreview() {
|
|||||||
placeholder = "Placeholder",
|
placeholder = "Placeholder",
|
||||||
placeholderColor = ElementTheme.colors.textSecondary,
|
placeholderColor = ElementTheme.colors.textSecondary,
|
||||||
onTyping = {},
|
onTyping = {},
|
||||||
|
onSendMessage = {},
|
||||||
onReceiveSuggestion = {},
|
onReceiveSuggestion = {},
|
||||||
richTextEditorStyle = style,
|
richTextEditorStyle = style,
|
||||||
onSelectRichContent = {},
|
onSelectRichContent = {},
|
||||||
|
|||||||
Reference in New Issue
Block a user