1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-13 13:50:32 +05:30

Minor fixes

This commit is contained in:
Arkadiusz Fal 2022-11-19 14:21:53 +01:00
parent 35c553cd05
commit b16ded4537

View File

@ -71,15 +71,17 @@ struct VideoDetails: View {
#endif #endif
} }
.onChange(of: player.currentItem) { newItem in .onChange(of: player.currentItem) { newItem in
guard let newItem else { Delay.by(0.2) {
page = sidebarQueue ? .inspector : .queue guard let newItem else {
return page = sidebarQueue ? .inspector : .queue
} return
}
if let video = newItem.video { if let video = newItem.video {
page = video.isLocal ? .inspector : .info page = video.isLocal ? .inspector : .info
} else { } else {
page = sidebarQueue ? .inspector : .queue page = sidebarQueue ? .inspector : .queue
}
} }
} }
} }
@ -87,7 +89,7 @@ struct VideoDetails: View {
if video.isNil || if video.isNil ||
!VideoDetailsTool.find(for: page)!.isAvailable(for: video!, sidebarQueue: sidebarQueue) !VideoDetailsTool.find(for: page)!.isAvailable(for: video!, sidebarQueue: sidebarQueue)
{ {
page = video == nil ? .inspector : (video!.isLocal ? .inspector : .info) page = video == nil ? (sidebarQueue ? .inspector : .queue) : (video!.isLocal ? .inspector : .info)
} }
guard video != nil, accounts.app.supportsSubscriptions else { guard video != nil, accounts.app.supportsSubscriptions else {