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
|
@Composable
|
||||||
private fun TextPreview(text: String, linkMode: SimplexLinkMode, markdown: Boolean = true) {
|
private fun TextPreview(text: String, linkMode: SimplexLinkMode, markdown: Boolean = true) {
|
||||||
Column(
|
Column {
|
||||||
Modifier.height(140.dp)
|
SelectionContainer(Modifier.fillMaxWidth()) {
|
||||||
) {
|
|
||||||
SelectionContainer(
|
|
||||||
Modifier.verticalScroll(rememberScrollState())
|
|
||||||
) {
|
|
||||||
MarkdownText(
|
MarkdownText(
|
||||||
text,
|
text,
|
||||||
formattedText = if (markdown) remember(text) { parseToMarkdown(text) } else null,
|
formattedText = if (markdown) remember(text) { parseToMarkdown(text) } else null,
|
||||||
|
@ -53,10 +53,10 @@ struct GroupWelcomeView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func textPreview() -> some View {
|
private func textPreview() -> some View {
|
||||||
ScrollView {
|
messageText(welcomeText, parseSimpleXMarkdown(welcomeText), nil)
|
||||||
messageText(welcomeText, parseSimpleXMarkdown(welcomeText), nil)
|
.allowsHitTesting(false)
|
||||||
.allowsHitTesting(false)
|
.frame(minHeight: 140, alignment: .topLeading)
|
||||||
}
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func editorView() -> some View {
|
private func editorView() -> some View {
|
||||||
@ -80,7 +80,6 @@ struct GroupWelcomeView: View {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
textPreview()
|
textPreview()
|
||||||
.frame(height: 140, alignment: .topLeading)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
|
Loading…
Reference in New Issue
Block a user