mobile: group welcome message to fill max width (#2480)
* mobile: group welcome message to fill max width * not limiting preview height * min height, no scroll --------- Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
This commit is contained in:
parent
dc73bb3caf
commit
f4861482f1
@ -114,12 +114,8 @@ private fun GroupWelcomeLayout(
|
||||
|
||||
@Composable
|
||||
private fun TextPreview(text: String, linkMode: SimplexLinkMode, markdown: Boolean = true) {
|
||||
Column(
|
||||
Modifier.height(140.dp)
|
||||
) {
|
||||
SelectionContainer(
|
||||
Modifier.verticalScroll(rememberScrollState())
|
||||
) {
|
||||
Column {
|
||||
SelectionContainer(Modifier.fillMaxWidth()) {
|
||||
MarkdownText(
|
||||
text,
|
||||
formattedText = if (markdown) remember(text) { parseToMarkdown(text) } else null,
|
||||
|
@ -53,10 +53,10 @@ struct GroupWelcomeView: View {
|
||||
}
|
||||
|
||||
private func textPreview() -> some View {
|
||||
ScrollView {
|
||||
messageText(welcomeText, parseSimpleXMarkdown(welcomeText), nil)
|
||||
.allowsHitTesting(false)
|
||||
}
|
||||
messageText(welcomeText, parseSimpleXMarkdown(welcomeText), nil)
|
||||
.allowsHitTesting(false)
|
||||
.frame(minHeight: 140, alignment: .topLeading)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
|
||||
private func editorView() -> some View {
|
||||
@ -80,7 +80,6 @@ struct GroupWelcomeView: View {
|
||||
}
|
||||
} else {
|
||||
textPreview()
|
||||
.frame(height: 140, alignment: .topLeading)
|
||||
}
|
||||
|
||||
Button {
|
||||
|
Loading…
Reference in New Issue
Block a user