Replace our custom Pager (#9494)

Turns out that changing the pagerSnapDistance
is enough to achieve the same result.
This commit is contained in:
Ivan Iskandar
2023-05-13 23:06:00 +07:00
committed by GitHub
parent 8df9bce1b4
commit 96defd6b05
6 changed files with 47 additions and 288 deletions
@@ -7,6 +7,7 @@ import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.foundation.pager.rememberPagerState
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.MoreVert
import androidx.compose.material3.Icon
@@ -31,7 +32,6 @@ import kotlinx.coroutines.launch
import tachiyomi.presentation.core.components.HorizontalPager
import tachiyomi.presentation.core.components.material.Divider
import tachiyomi.presentation.core.components.material.TabIndicator
import tachiyomi.presentation.core.components.rememberPagerState
object TabbedDialogPaddings {
val Horizontal = 24.dp
@@ -84,7 +84,7 @@ fun TabbedDialog(
HorizontalPager(
modifier = Modifier.animateContentSize(),
count = tabTitles.size,
pageCount = tabTitles.size,
state = pagerState,
verticalAlignment = Alignment.Top,
) { page ->