🛠️ Replace if with when
* Replaced if with when in ReaderSettingsBottomSheet
This commit is contained in:
parent
5eaa3963a7
commit
f2d8042164
1 changed files with 49 additions and 47 deletions
|
|
@ -86,7 +86,8 @@ fun ReaderSettingsBottomSheet() {
|
||||||
ReaderSettingsBottomSheetTabRow(pagerState = pagerState)
|
ReaderSettingsBottomSheetTabRow(pagerState = pagerState)
|
||||||
|
|
||||||
HorizontalPager(state = pagerState) { page ->
|
HorizontalPager(state = pagerState) { page ->
|
||||||
if (page == 0) {
|
when (page) {
|
||||||
|
0 -> {
|
||||||
CustomLazyColumn(Modifier.fillMaxSize()) {
|
CustomLazyColumn(Modifier.fillMaxSize()) {
|
||||||
PaddingSubcategory(
|
PaddingSubcategory(
|
||||||
titleColor = { MaterialTheme.colorScheme.onSurface },
|
titleColor = { MaterialTheme.colorScheme.onSurface },
|
||||||
|
|
@ -107,7 +108,7 @@ fun ReaderSettingsBottomSheet() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (page == 1) {
|
1 -> {
|
||||||
CustomLazyColumn(Modifier.fillMaxSize()) {
|
CustomLazyColumn(Modifier.fillMaxSize()) {
|
||||||
FontSubcategory(
|
FontSubcategory(
|
||||||
titleColor = { MaterialTheme.colorScheme.onSurface },
|
titleColor = { MaterialTheme.colorScheme.onSurface },
|
||||||
|
|
@ -128,7 +129,7 @@ fun ReaderSettingsBottomSheet() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (page == 2) {
|
2 -> {
|
||||||
CustomLazyColumn(Modifier.fillMaxSize()) {
|
CustomLazyColumn(Modifier.fillMaxSize()) {
|
||||||
ColorsSubcategory(
|
ColorsSubcategory(
|
||||||
showTitle = false,
|
showTitle = false,
|
||||||
|
|
@ -142,3 +143,4 @@ fun ReaderSettingsBottomSheet() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue