mirror of
				https://github.com/yattee/yattee.git
				synced 2025-10-31 12:41:57 +00:00 
			
		
		
		
	Details improvements
This commit is contained in:
		| @@ -68,7 +68,7 @@ struct VideoDetails: View { | |||||||
|                 pageButton("Chapters", "bookmark", .chapters, !(video?.chapters.isEmpty ?? true)) |                 pageButton("Chapters", "bookmark", .chapters, !(video?.chapters.isEmpty ?? true)) | ||||||
|                 pageButton("Comments", "text.bubble", .comments, !video.isNil) { comments.load() } |                 pageButton("Comments", "text.bubble", .comments, !video.isNil) { comments.load() } | ||||||
|                 pageButton("Related", "rectangle.stack.fill", .related, !video.isNil) |                 pageButton("Related", "rectangle.stack.fill", .related, !video.isNil) | ||||||
|                 pageButton("Queue", "list.number", .queue, !video.isNil) |                 pageButton("Queue", "list.number", .queue, !player.queue.isEmpty) | ||||||
|             } |             } | ||||||
|             .onChange(of: player.currentItem) { _ in |             .onChange(of: player.currentItem) { _ in | ||||||
|                 page.update(.moveToFirst) |                 page.update(.moveToFirst) | ||||||
| @@ -77,7 +77,11 @@ struct VideoDetails: View { | |||||||
|             .padding(.vertical, 6) |             .padding(.vertical, 6) | ||||||
|  |  | ||||||
|             Pager(page: page, data: DetailsPage.allCases, id: \.self) { |             Pager(page: page, data: DetailsPage.allCases, id: \.self) { | ||||||
|  |                 if !player.currentItem.isNil || page.index == DetailsPage.queue.index { | ||||||
|                     detailsByPage($0) |                     detailsByPage($0) | ||||||
|  |                 } else { | ||||||
|  |                     VStack {} | ||||||
|  |                 } | ||||||
|             } |             } | ||||||
|             .onPageWillChange { pageIndex in |             .onPageWillChange { pageIndex in | ||||||
|                 if pageIndex == DetailsPage.comments.index { |                 if pageIndex == DetailsPage.comments.index { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Arkadiusz Fal
					Arkadiusz Fal