Fix pager swipe directions in RTL layout

This commit is contained in:
MM20 2023-12-29 19:08:15 +01:00
parent 0bfdd1484f
commit f2881874a2
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -81,6 +81,7 @@ import androidx.compose.ui.platform.LocalSoftwareKeyboardController
import androidx.compose.ui.platform.LocalViewConfiguration
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.Velocity
import androidx.compose.ui.unit.dp
import androidx.lifecycle.viewmodel.compose.viewModel
@ -398,7 +399,7 @@ fun PagerScaffold(
.fillMaxSize()
.nestedScroll(pagerNestedScrollConnection),
beyondBoundsPageCount = 1,
reverseLayout = reverse,
reverseLayout = reverse == (LocalLayoutDirection.current == LayoutDirection.Ltr),
state = pagerState,
userScrollEnabled = false,//!isWidgetEditMode,
flingBehavior = PagerDefaults.flingBehavior(