mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
no preview shows nothing now
This commit is contained in:
parent
cbdf295d67
commit
ed5fa8e4aa
@ -23,21 +23,24 @@ struct VideoDescription: View {
|
|||||||
descriptionView.id(video.videoID)
|
descriptionView.id(video.videoID)
|
||||||
}
|
}
|
||||||
|
|
||||||
var descriptionView: some View {
|
@ViewBuilder var descriptionView: some View {
|
||||||
|
if !expand && collapsedLinesDescription == 0 {
|
||||||
|
EmptyView()
|
||||||
|
} else {
|
||||||
VStack {
|
VStack {
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
ActiveLabelDescriptionRepresentable(
|
ActiveLabelDescriptionRepresentable(
|
||||||
description: description,
|
description: description,
|
||||||
detailsSize: detailsSize,
|
detailsSize: detailsSize,
|
||||||
expand: shouldExpand
|
expand: expand
|
||||||
)
|
)
|
||||||
#else
|
#else
|
||||||
textDescription
|
textDescription
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
keywords
|
keywords
|
||||||
|
}.contentShape(Rectangle())
|
||||||
}
|
}
|
||||||
.contentShape(Rectangle())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var shouldExpand: Bool {
|
var shouldExpand: Bool {
|
||||||
@ -176,7 +179,12 @@ struct VideoDescription: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func updateNumberOfLines() {
|
func updateNumberOfLines() {
|
||||||
|
if expand || collapsedLinesDescription > 0 {
|
||||||
label.numberOfLines = expand ? 0 : collapsedLinesDescription
|
label.numberOfLines = expand ? 0 : collapsedLinesDescription
|
||||||
|
label.isHidden = false
|
||||||
|
} else {
|
||||||
|
label.isHidden = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func urlTapHandler(_ url: URL) {
|
func urlTapHandler(_ url: URL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user