Fix switching tabs when changing the pager height
This commit is contained in:
@@ -177,12 +177,9 @@ fun ProfileScreen(userId: String?, accountViewModel: AccountViewModel, navContro
|
|||||||
HorizontalPager(
|
HorizontalPager(
|
||||||
count = 4,
|
count = 4,
|
||||||
state = pagerState,
|
state = pagerState,
|
||||||
modifier = Modifier.then(with(LocalDensity.current) {
|
modifier = with(LocalDensity.current) {
|
||||||
Modifier.size(
|
Modifier.height((columnSize.height - tabsSize.height).toDp())
|
||||||
width = columnSize.width.toDp(),
|
}
|
||||||
height = (columnSize.height - tabsSize.height).toDp(),
|
|
||||||
)
|
|
||||||
})
|
|
||||||
) {
|
) {
|
||||||
when (pagerState.currentPage) {
|
when (pagerState.currentPage) {
|
||||||
0 -> TabNotes(baseUser, accountViewModel, navController)
|
0 -> TabNotes(baseUser, accountViewModel, navController)
|
||||||
|
|||||||
Reference in New Issue
Block a user