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