Modern Apps git

← Modern-Apps.git

music: forward only bottom inset to tab pager to fix double top padding

Commit
750f73700e5fed5a0f6a9b6cc4f79b9a332705e0
Author
Vayun Mathur <[email protected]>
When
2026-05-29 17:55 UTC (6 months ago)
Parents
1bd1d11

Diff

music/src/main/java/com/vayunmathur/music/ui/MusicTabsScreen.kt
diff --git a/music/src/main/java/com/vayunmathur/music/ui/MusicTabsScreen.kt b/music/src/main/java/com/vayunmathur/music/ui/MusicTabsScreen.ktindex ea2f2b686b..1caf2e8bf0 100644--- a/music/src/main/java/com/vayunmathur/music/ui/MusicTabsScreen.kt+++ b/music/src/main/java/com/vayunmathur/music/ui/MusicTabsScreen.kt@@ -80,10 +80,14 @@ fun MusicTabsScreen(             }         }     ) { padding ->+        // Inner pages each have their own Scaffold (ListPage owns a TopAppBar+        // and consumes the top system inset). Only the BOTTOM space taken by+        // this Scaffold's bottomBar needs to be forwarded — passing the full+        // PaddingValues here was adding the status-bar inset twice and pushing+        // the TopAppBar down.         HorizontalPager(             state = pagerState,-            modifier = Modifier.padding(padding),-            // Each page renders its own ListPage Scaffold (with TopAppBar + FAB).+            modifier = Modifier.padding(bottom = padding.calculateBottomPadding()),         ) { page ->             when (page) {                 0 -> HomeTabContent(backStack, viewModel, musicViewModel)