mirror of
https://github.com/yattee/yattee.git
synced 2026-05-12 18:35:05 +00:00
Show video title placeholder while thumbnails load
This commit is contained in:
@@ -67,10 +67,10 @@ struct DeArrowVideoThumbnail: View {
|
||||
private var downloadProgressIndeterminate: Bool { false }
|
||||
#endif
|
||||
|
||||
/// Title to show on placeholder for media source videos without thumbnails.
|
||||
/// Title to show on placeholder while the thumbnail is loading or absent.
|
||||
private var placeholderTitle: String? {
|
||||
guard displayThumbnailURL == nil, video.isFromMediaSource else { return nil }
|
||||
return video.title
|
||||
let title = video.displayTitle(using: deArrowProvider)
|
||||
return title.isEmpty ? nil : title
|
||||
}
|
||||
|
||||
/// Whether to show watched checkmark from settings.
|
||||
|
||||
@@ -638,7 +638,6 @@ struct VideoInfoView: View {
|
||||
Rectangle()
|
||||
.fill(.quaternary)
|
||||
.overlay {
|
||||
if video.bestThumbnail?.url == nil, video.isFromMediaSource {
|
||||
Text(video.displayTitle(using: appEnvironment?.deArrowBrandingProvider))
|
||||
.font(.caption)
|
||||
.fontWeight(.medium)
|
||||
@@ -650,7 +649,6 @@ struct VideoInfoView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private func tvOSChannelRow(for video: Video) -> some View {
|
||||
@@ -939,7 +937,6 @@ struct VideoInfoView: View {
|
||||
.fill(.quaternary)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 8))
|
||||
.overlay {
|
||||
if video.bestThumbnail?.url == nil, video.isFromMediaSource {
|
||||
Text(video.displayTitle(using: appEnvironment?.deArrowBrandingProvider))
|
||||
.font(.caption)
|
||||
.fontWeight(.medium)
|
||||
@@ -950,7 +947,6 @@ struct VideoInfoView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.aspectRatio(16/9, contentMode: .fit)
|
||||
.frame(width: thumbnailWidth)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user