mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Minor fixes
This commit is contained in:
@@ -123,17 +123,14 @@ struct VideoBanner: View {
|
||||
#endif
|
||||
}
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.contentShape(Rectangle())
|
||||
|
||||
#if os(tvOS)
|
||||
.buttonStyle(.card)
|
||||
#else
|
||||
.padding(.trailing, 10)
|
||||
#elseif os(macOS)
|
||||
.buttonStyle(.plain)
|
||||
#endif
|
||||
#if os(tvOS)
|
||||
.padding(.trailing, 10)
|
||||
#endif
|
||||
.opacity(contentOpacity)
|
||||
.id(id ?? video?.videoID ?? video?.id)
|
||||
.opacity(contentOpacity)
|
||||
}
|
||||
|
||||
private var extraAttributes: some View {
|
||||
|
@@ -15,8 +15,6 @@ struct VideoCell: View {
|
||||
@Environment(\.verticalSizeClass) private var verticalSizeClass
|
||||
#endif
|
||||
|
||||
@ObservedObject private var thumbnails = ThumbnailsModel.shared
|
||||
|
||||
@Default(.channelOnThumbnail) private var channelOnThumbnail
|
||||
@Default(.timeOnThumbnail) private var timeOnThumbnail
|
||||
@Default(.roundedThumbnails) private var roundedThumbnails
|
||||
@@ -445,7 +443,7 @@ struct VideoCell: View {
|
||||
|
||||
private var thumbnailImage: some View {
|
||||
Group {
|
||||
ThumbnailView(url: thumbnails.best(video))
|
||||
VideoCellThumbnail(video: video)
|
||||
|
||||
#if os(tvOS)
|
||||
.frame(minHeight: 320)
|
||||
@@ -503,6 +501,15 @@ struct VideoCell: View {
|
||||
}
|
||||
}
|
||||
|
||||
struct VideoCellThumbnail: View {
|
||||
let video: Video
|
||||
@ObservedObject private var thumbnails = ThumbnailsModel.shared
|
||||
|
||||
var body: some View {
|
||||
ThumbnailView(url: thumbnails.best(video))
|
||||
}
|
||||
}
|
||||
|
||||
struct VideoCell_Preview: PreviewProvider {
|
||||
static var previews: some View {
|
||||
Group {
|
||||
|
Reference in New Issue
Block a user