From 0558cf98f7446f232fcc78514fbd3c5887f77313 Mon Sep 17 00:00:00 2001 From: Carlos <2092019+CarlosEsco@users.noreply.github.com> Date: Fri, 27 Jan 2023 08:51:24 -0500 Subject: [PATCH] Remove ability to select description words, to fix scrolling issue when description is expanded --- .../presentation/screens/MangaScreen.kt | 4 ++-- .../screens/mangadetails/DescriptionBlock.kt | 21 ++++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt b/app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt index 4685f5cfc4..2ba45f7751 100644 --- a/app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt +++ b/app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt @@ -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() } diff --git a/app/src/main/java/org/nekomanga/presentation/screens/mangadetails/DescriptionBlock.kt b/app/src/main/java/org/nekomanga/presentation/screens/mangadetails/DescriptionBlock.kt index 98bf082379..437f4f344e 100644 --- a/app/src/main/java/org/nekomanga/presentation/screens/mangadetails/DescriptionBlock.kt +++ b/app/src/main/java/org/nekomanga/presentation/screens/mangadetails/DescriptionBlock.kt @@ -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 @@ -114,6 +113,7 @@ fun DescriptionBlock( } Box { + Markdown( content = text, colors = markdownColors(), @@ -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)