Don't hide related on load

This commit is contained in:
Arkadiusz Fal 2022-09-02 01:05:41 +02:00
parent f607e6e276
commit d48fc71660

View File

@ -5,7 +5,6 @@ import SwiftUI
struct PlayerQueueView: View { struct PlayerQueueView: View {
var sidebarQueue: Bool var sidebarQueue: Bool
@Binding var fullScreen: Bool @Binding var fullScreen: Bool
@State private var relatedVisible = false
@FetchRequest(sortDescriptors: [.init(key: "watchedAt", ascending: false)]) @FetchRequest(sortDescriptors: [.init(key: "watchedAt", ascending: false)])
var watches: FetchedResults<Watch> var watches: FetchedResults<Watch>
@ -25,7 +24,7 @@ struct PlayerQueueView: View {
autoplaying autoplaying
} }
playingNext playingNext
if sidebarQueue, relatedVisible { if sidebarQueue {
related related
} }
if saveHistory, showHistoryInPlayer { if saveHistory, showHistoryInPlayer {
@ -38,15 +37,6 @@ struct PlayerQueueView: View {
.listRowInsets(EdgeInsets()) .listRowInsets(EdgeInsets())
#endif #endif
} }
.onChange(of: player.currentItem) { _ in
relatedVisible = false
Delay.by(2) {
withAnimation(.easeIn(duration: 0.25)) {
self.relatedVisible = true
}
}
}
#if os(macOS) #if os(macOS)
.listStyle(.inset) .listStyle(.inset)
#elseif os(iOS) #elseif os(iOS)