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,6 +71,7 @@ struct VideoDetails: View {
#endif
}
.onChange(of: player.currentItem) { newItem in
Delay.by(0.2) {
guard let newItem else {
page = sidebarQueue ? .inspector : .queue
return
@ -83,11 +84,12 @@ struct VideoDetails: View {
}
}
}
}
.onAppear {
if video.isNil ||
!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 {