Keep mini player mounted in tab accessory
This commit is contained in:
1 parent
037fb01623
commit
875045a4a9
3 files changed
+35
-32
No files matched your search
@@ -5,15 +5,10 @@ struct MainTabView: View {
|
||||
@AppStorage("music.selected-tab") private var selectedTabRawValue = MainTab.home.rawValue
|
||||
|
||||
var body: some View {
|
||||
Group {
|
||||
if player.currentTrack != nil {
|
||||
tabs.tabViewBottomAccessory {
|
||||
PlayerBottomAccessoryView()
|
||||
}
|
||||
} else {
|
||||
tabs
|
||||
tabs
|
||||
.tabViewBottomAccessory {
|
||||
PlayerBottomAccessoryView()
|
||||
}
|
||||
}
|
||||
.animation(.snappy(duration: 0.25), value: player.currentTrack?.id)
|
||||
.animation(.snappy(duration: 0.25), value: player.isMiniPlayerCompact)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user