Actually show the error message when video loading fails

See #531
This commit is contained in:
Shadowfacts 2024-08-22 14:54:16 -04:00
parent cd8f0e7926
commit 3d1f506684
1 changed files with 7 additions and 0 deletions

View File

@ -138,9 +138,16 @@ class VideoGalleryContentViewController: UIViewController, GalleryContentViewCon
label.textColor = .secondaryLabel label.textColor = .secondaryLabel
label.adjustsFontForContentSizeCategory = true label.adjustsFontForContentSizeCategory = true
let reason = UILabel()
reason.text = error.localizedDescription
reason.font = .preferredFont(forTextStyle: .subheadline)
reason.textColor = .secondaryLabel
reason.adjustsFontForContentSizeCategory = true
let stackView = UIStackView(arrangedSubviews: [ let stackView = UIStackView(arrangedSubviews: [
image, image,
label, label,
reason,
]) ])
stackView.translatesAutoresizingMaskIntoConstraints = false stackView.translatesAutoresizingMaskIntoConstraints = false
stackView.axis = .vertical stackView.axis = .vertical