Replace our custom Pager (#9494)

Turns out that changing the pagerSnapDistance
is enough to achieve the same result.

(cherry picked from commit 96defd6b054101c540dc62907e43f4aa5db1ef6c)
This commit is contained in:
Ivan Iskandar
2023-05-13 23:06:00 +07:00
committed by Jobobby04
parent beb62884d0
commit 7ea6f685bf
6 changed files with 47 additions and 288 deletions
@@ -7,6 +7,7 @@ import androidx.compose.foundation.layout.calculateEndPadding
import androidx.compose.foundation.layout.calculateStartPadding
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.pager.rememberPagerState
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.SnackbarHost
import androidx.compose.material3.SnackbarHostState
@@ -25,7 +26,6 @@ import tachiyomi.presentation.core.components.HorizontalPager
import tachiyomi.presentation.core.components.material.Scaffold
import tachiyomi.presentation.core.components.material.TabIndicator
import tachiyomi.presentation.core.components.material.TabText
import tachiyomi.presentation.core.components.rememberPagerState
@Composable
fun TabbedScreen(
@@ -82,7 +82,7 @@ fun TabbedScreen(
}
HorizontalPager(
count = tabs.size,
pageCount = tabs.size,
modifier = Modifier.fillMaxSize(),
state = state,
verticalAlignment = Alignment.Top,