From 3d1f506684bffba106216b5908543f1fffdd4964 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Thu, 22 Aug 2024 14:54:16 -0400 Subject: [PATCH] Actually show the error message when video loading fails See #531 --- .../Gallery/VideoGalleryContentViewController.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Tusker/Screens/Gallery/VideoGalleryContentViewController.swift b/Tusker/Screens/Gallery/VideoGalleryContentViewController.swift index 2549b224d0..ae15770328 100644 --- a/Tusker/Screens/Gallery/VideoGalleryContentViewController.swift +++ b/Tusker/Screens/Gallery/VideoGalleryContentViewController.swift @@ -138,9 +138,16 @@ class VideoGalleryContentViewController: UIViewController, GalleryContentViewCon label.textColor = .secondaryLabel 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: [ image, label, + reason, ]) stackView.translatesAutoresizingMaskIntoConstraints = false stackView.axis = .vertical