Skip to content

Commit

Permalink
Remove ability to select description words, to fix scrolling issue wh…
Browse files Browse the repository at this point in the history
…en description is expanded
  • Loading branch information
nonproto committed Jan 27, 2023
1 parent eefa5fd commit 0558cf9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,11 @@ private fun NormalLayout(
chapterRow: @Composable (Int, ChapterItem) -> Unit,
) {
LazyColumn(modifier = Modifier.fillMaxSize(), contentPadding = contentPadding) {
item {
item(key = 1) {
details()
}

item {
item(key = 2) {
chapterHeader()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyRow
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.text.selection.SelectionContainer
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Check
import androidx.compose.material.icons.filled.ExpandLess
Expand Down Expand Up @@ -114,6 +113,7 @@ fun DescriptionBlock(
}

Box {

Markdown(
content = text,
colors = markdownColors(),
Expand Down Expand Up @@ -157,15 +157,16 @@ fun DescriptionBlock(
}
val text = descriptionProvider().trim()

SelectionContainer {
Markdown(
content = text,
colors = markdownColors(),
typography = markdownTypography(),
flavour = CommonMarkFlavourDescriptor(),
modifier = clickable,
)
}
// SelectionContainer {

Markdown(
content = text,
colors = markdownColors(),
typography = markdownTypography(),
flavour = CommonMarkFlavourDescriptor(),
modifier = clickable,
)
//}

if (windowSizeClass.widthSizeClass != WindowWidthSizeClass.Expanded) {
Gap(8.dp)
Expand Down

0 comments on commit 0558cf9

Please sign in to comment.