mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 21:07:04 +05:30
Revert "Revert "fix(common): make text in comments screen selectable""
This reverts commit 401214794d
.
This commit is contained in:
parent
e48a6d41d5
commit
c5ec6cd680
1 changed files with 11 additions and 6 deletions
|
@ -19,6 +19,7 @@ import androidx.compose.foundation.layout.height
|
|||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.foundation.text.selection.SelectionContainer
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Public
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
|
@ -70,7 +71,7 @@ internal fun CommentsHeader(
|
|||
modifier = Modifier.padding(16.dp).fillMaxWidth(),
|
||||
verticalArrangement = Arrangement.spacedBy(8.dp),
|
||||
) {
|
||||
PostTitle(title = postDetails.title)
|
||||
SelectionContainer { PostTitle(title = postDetails.title) }
|
||||
TagRow(tags = postDetails.tags.toImmutableList())
|
||||
Spacer(Modifier.height(4.dp))
|
||||
|
||||
|
@ -84,7 +85,9 @@ internal fun CommentsHeader(
|
|||
}
|
||||
|
||||
if (postDetails.description.isNotBlank()) {
|
||||
SelectionContainer {
|
||||
ThemedRichText(htmlConverter.convertHTMLToMarkdown(postDetails.description))
|
||||
}
|
||||
Spacer(Modifier.height(4.dp))
|
||||
}
|
||||
Submitter(
|
||||
|
@ -169,6 +172,7 @@ internal fun CommentEntry(
|
|||
Modifier.clickable { uriHandler.openUri("https://lobste.rs/u/${comment.user.username}") },
|
||||
)
|
||||
if (commentNode.isExpanded) {
|
||||
SelectionContainer {
|
||||
ThemedRichText(
|
||||
text = htmlConverter.convertHTMLToMarkdown(comment.comment),
|
||||
modifier = Modifier.padding(top = 8.dp)
|
||||
|
@ -177,6 +181,7 @@ internal fun CommentEntry(
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun buildCommenterString(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue