Animations improvements

This commit is contained in:
Arkadiusz Fal
2022-08-25 19:09:55 +02:00
parent 5f50797b54
commit 08ed810b9e
17 changed files with 205 additions and 103 deletions

View File

@@ -157,6 +157,7 @@ struct AppTabNavigation: View {
.environmentObject(subscriptions)
.environmentObject(thumbnailsModel)
.id("channelVideos")
.zIndex(player.presentingPlayer ? -1 : 2)
.transition(.move(edge: .bottom))
}
}
@@ -171,6 +172,7 @@ struct AppTabNavigation: View {
.environmentObject(subscriptions)
.environmentObject(thumbnailsModel)
.id("channelPlaylist")
.zIndex(player.presentingPlayer ? -1 : 1)
.transition(.move(edge: .bottom))
}
}

View File

@@ -133,7 +133,8 @@ struct ContentView: View {
@ViewBuilder var videoPlayer: some View {
if player.presentingPlayer {
playerView
.transition(.move(edge: .bottom))
.transition(.asymmetric(insertion: .identity, removal: .move(edge: .bottom)))
.zIndex(3)
} else if player.activeBackend == .appleAVPlayer {
#if os(iOS)
playerView.offset(y: UIScreen.main.bounds.height)