mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Don't hide related on load
This commit is contained in:
parent
f607e6e276
commit
d48fc71660
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user