🛠️ Replace if with when

* Replaced if with when in ReaderSettingsBottomSheet
This commit is contained in:
Acclorite 2024-09-20 22:03:39 +03:00
parent 5eaa3963a7
commit f2d8042164

View file

@ -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() {
} }
} }
} }
}