🛠️ Replace LazyColumn with CustomLazyColumn in BottomSheets
* Replaced LazyColumn with CustomLazyColumn, which enables scrollbar
This commit is contained in:
parent
0481252f71
commit
06fd97bd88
2 changed files with 8 additions and 8 deletions
|
|
@ -3,13 +3,13 @@ package ua.acclorite.book_story.presentation.screens.browse.components.filter_bo
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
|
||||||
import androidx.compose.foundation.pager.HorizontalPager
|
import androidx.compose.foundation.pager.HorizontalPager
|
||||||
import androidx.compose.foundation.pager.rememberPagerState
|
import androidx.compose.foundation.pager.rememberPagerState
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.LaunchedEffect
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
|
import ua.acclorite.book_story.presentation.core.components.CustomLazyColumn
|
||||||
import ua.acclorite.book_story.presentation.core.components.LocalBrowseViewModel
|
import ua.acclorite.book_story.presentation.core.components.LocalBrowseViewModel
|
||||||
import ua.acclorite.book_story.presentation.core.components.custom_bottom_sheet.CustomBottomSheet
|
import ua.acclorite.book_story.presentation.core.components.custom_bottom_sheet.CustomBottomSheet
|
||||||
import ua.acclorite.book_story.presentation.screens.browse.data.BrowseEvent
|
import ua.acclorite.book_story.presentation.screens.browse.data.BrowseEvent
|
||||||
|
|
@ -55,7 +55,7 @@ fun BrowseFilterBottomSheet() {
|
||||||
HorizontalPager(state = pagerState, modifier = Modifier.fillMaxSize()) { page ->
|
HorizontalPager(state = pagerState, modifier = Modifier.fillMaxSize()) { page ->
|
||||||
when (page) {
|
when (page) {
|
||||||
0 -> {
|
0 -> {
|
||||||
LazyColumn(Modifier.fillMaxSize()) {
|
CustomLazyColumn(Modifier.fillMaxSize()) {
|
||||||
BrowseGeneralSubcategory(
|
BrowseGeneralSubcategory(
|
||||||
showTitle = false,
|
showTitle = false,
|
||||||
showDivider = false,
|
showDivider = false,
|
||||||
|
|
@ -66,7 +66,7 @@ fun BrowseFilterBottomSheet() {
|
||||||
}
|
}
|
||||||
|
|
||||||
1 -> {
|
1 -> {
|
||||||
LazyColumn(Modifier.fillMaxSize()) {
|
CustomLazyColumn(Modifier.fillMaxSize()) {
|
||||||
BrowseFilterSubcategory(
|
BrowseFilterSubcategory(
|
||||||
showTitle = false,
|
showTitle = false,
|
||||||
showDivider = false,
|
showDivider = false,
|
||||||
|
|
@ -77,7 +77,7 @@ fun BrowseFilterBottomSheet() {
|
||||||
}
|
}
|
||||||
|
|
||||||
2 -> {
|
2 -> {
|
||||||
LazyColumn(Modifier.fillMaxSize()) {
|
CustomLazyColumn(Modifier.fillMaxSize()) {
|
||||||
BrowseSortSubcategory(
|
BrowseSortSubcategory(
|
||||||
showTitle = false,
|
showTitle = false,
|
||||||
showDivider = false,
|
showDivider = false,
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import androidx.compose.animation.core.tween
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
|
||||||
import androidx.compose.foundation.pager.HorizontalPager
|
import androidx.compose.foundation.pager.HorizontalPager
|
||||||
import androidx.compose.foundation.pager.rememberPagerState
|
import androidx.compose.foundation.pager.rememberPagerState
|
||||||
import androidx.compose.material3.BottomSheetDefaults
|
import androidx.compose.material3.BottomSheetDefaults
|
||||||
|
|
@ -20,6 +19,7 @@ import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
|
import ua.acclorite.book_story.presentation.core.components.CustomLazyColumn
|
||||||
import ua.acclorite.book_story.presentation.core.components.LocalMainViewModel
|
import ua.acclorite.book_story.presentation.core.components.LocalMainViewModel
|
||||||
import ua.acclorite.book_story.presentation.core.components.LocalReaderViewModel
|
import ua.acclorite.book_story.presentation.core.components.LocalReaderViewModel
|
||||||
import ua.acclorite.book_story.presentation.core.components.custom_bottom_sheet.CustomBottomSheet
|
import ua.acclorite.book_story.presentation.core.components.custom_bottom_sheet.CustomBottomSheet
|
||||||
|
|
@ -86,7 +86,7 @@ fun ReaderSettingsBottomSheet() {
|
||||||
|
|
||||||
HorizontalPager(state = pagerState) { page ->
|
HorizontalPager(state = pagerState) { page ->
|
||||||
if (page == 0) {
|
if (page == 0) {
|
||||||
LazyColumn(Modifier.fillMaxSize()) {
|
CustomLazyColumn(Modifier.fillMaxSize()) {
|
||||||
PaddingSubcategory(
|
PaddingSubcategory(
|
||||||
titleColor = { MaterialTheme.colorScheme.onSurface },
|
titleColor = { MaterialTheme.colorScheme.onSurface },
|
||||||
topPadding = 22.dp,
|
topPadding = 22.dp,
|
||||||
|
|
@ -102,7 +102,7 @@ fun ReaderSettingsBottomSheet() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (page == 1) {
|
if (page == 1) {
|
||||||
LazyColumn(Modifier.fillMaxSize()) {
|
CustomLazyColumn(Modifier.fillMaxSize()) {
|
||||||
FontSubcategory(
|
FontSubcategory(
|
||||||
titleColor = { MaterialTheme.colorScheme.onSurface },
|
titleColor = { MaterialTheme.colorScheme.onSurface },
|
||||||
topPadding = 16.dp,
|
topPadding = 16.dp,
|
||||||
|
|
@ -123,7 +123,7 @@ fun ReaderSettingsBottomSheet() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (page == 2) {
|
if (page == 2) {
|
||||||
LazyColumn(Modifier.fillMaxSize()) {
|
CustomLazyColumn(Modifier.fillMaxSize()) {
|
||||||
ColorsSubcategory(
|
ColorsSubcategory(
|
||||||
showTitle = false,
|
showTitle = false,
|
||||||
showDivider = false,
|
showDivider = false,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue