mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Improve video banner and playback queue view
This commit is contained in:
@@ -87,6 +87,10 @@ struct VideoDetails: View {
|
||||
}
|
||||
}
|
||||
.onAppear {
|
||||
if video.isNil {
|
||||
currentPage = .queue
|
||||
}
|
||||
|
||||
guard video != nil, accounts.app.supportsSubscriptions else {
|
||||
subscribed = false
|
||||
return
|
||||
@@ -94,6 +98,15 @@ struct VideoDetails: View {
|
||||
|
||||
subscribed = subscriptions.isSubscribing(video!.channel.id)
|
||||
}
|
||||
.onChange(of: sidebarQueue) { queue in
|
||||
#if !os(macOS)
|
||||
if queue {
|
||||
currentPage = .details
|
||||
} else {
|
||||
currentPage = .queue
|
||||
}
|
||||
#endif
|
||||
}
|
||||
.edgesIgnoringSafeArea(.horizontal)
|
||||
.frame(minWidth: 0, maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
@@ -112,11 +125,6 @@ struct VideoDetails: View {
|
||||
} else {
|
||||
Text("Not playing")
|
||||
.foregroundColor(.secondary)
|
||||
.onAppear {
|
||||
#if !os(macOS)
|
||||
currentPage = .queue
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
Reference in New Issue
Block a user