mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 23:39:15 +01:00
respect the nav bar inset for the tab bar and apply the artwork theme globally
This commit is contained in:
@@ -61,6 +61,7 @@ import com.subtracks.ui.playback.NowPlayingRoute
|
||||
import com.subtracks.ui.playback.QueueRoute
|
||||
import com.subtracks.ui.settings.AddSourceRoute
|
||||
import com.subtracks.ui.settings.SettingsRoute
|
||||
import com.subtracks.ui.theme.ArtworkTheme
|
||||
import com.subtracks.ui.theme.rememberArtworkColors
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.flow.SharingStarted
|
||||
@@ -156,6 +157,8 @@ private fun MainNavigation() {
|
||||
val keyboardUp = WindowInsets.imeAnimationTarget.getBottom(density) > 0
|
||||
val showMiniPlayer = playerVisible && !keyboardUp
|
||||
|
||||
val artwork = rememberArtworkColors(playbackController.coverArt(playback.item, thumbnail = true))
|
||||
ArtworkTheme(artwork) {
|
||||
Box(Modifier.fillMaxSize()) {
|
||||
Column(Modifier.fillMaxSize().imePadding()) {
|
||||
NavHost(
|
||||
@@ -328,6 +331,7 @@ private fun MainNavigation() {
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BackHandler(enabled = showingQueue) { showingQueue = false }
|
||||
BackHandler(enabled = nowPlayingOpen && !showingQueue) {
|
||||
|
||||
@@ -407,6 +407,7 @@ fun LibraryScreen(
|
||||
Modifier
|
||||
.fillMaxWidth()
|
||||
.align(Alignment.BottomCenter)
|
||||
.padding(bottom = bottomInset)
|
||||
.onSizeChanged { tabBarHeightPx = it.height.toFloat() },
|
||||
) {
|
||||
LibraryTabs(
|
||||
|
||||
Reference in New Issue
Block a user