🛠️ 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)
|
||||
|
||||
HorizontalPager(state = pagerState) { page ->
|
||||
if (page == 0) {
|
||||
when (page) {
|
||||
0 -> {
|
||||
CustomLazyColumn(Modifier.fillMaxSize()) {
|
||||
PaddingSubcategory(
|
||||
titleColor = { MaterialTheme.colorScheme.onSurface },
|
||||
|
|
@ -107,7 +108,7 @@ fun ReaderSettingsBottomSheet() {
|
|||
}
|
||||
}
|
||||
|
||||
if (page == 1) {
|
||||
1 -> {
|
||||
CustomLazyColumn(Modifier.fillMaxSize()) {
|
||||
FontSubcategory(
|
||||
titleColor = { MaterialTheme.colorScheme.onSurface },
|
||||
|
|
@ -128,7 +129,7 @@ fun ReaderSettingsBottomSheet() {
|
|||
}
|
||||
}
|
||||
|
||||
if (page == 2) {
|
||||
2 -> {
|
||||
CustomLazyColumn(Modifier.fillMaxSize()) {
|
||||
ColorsSubcategory(
|
||||
showTitle = false,
|
||||
|
|
@ -142,3 +143,4 @@ fun ReaderSettingsBottomSheet() {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue