From 37109ad71962a37444c1cabeb223daaa20bc5151 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Tue, 25 Aug 2020 13:50:34 +0300 Subject: [PATCH] Fix video scrubber info label --- .../Sources/ChatVideoGalleryItemScrubberView.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/submodules/GalleryUI/Sources/ChatVideoGalleryItemScrubberView.swift b/submodules/GalleryUI/Sources/ChatVideoGalleryItemScrubberView.swift index 4bcc2091d9..baa26a72cf 100644 --- a/submodules/GalleryUI/Sources/ChatVideoGalleryItemScrubberView.swift +++ b/submodules/GalleryUI/Sources/ChatVideoGalleryItemScrubberView.swift @@ -128,10 +128,14 @@ final class ChatVideoGalleryItemScrubberView: UIView { self.collapsed = collapsed + guard let (size, _, _) = self.containerLayout else { + return + } + let alpha: CGFloat = collapsed ? 0.0 : 1.0 self.leftTimestampNode.alpha = alpha self.rightTimestampNode.alpha = alpha - self.infoNode.alpha = alpha + self.infoNode.alpha = size.width < size.height && !self.collapsed ? 1.0 : 0.0 self.updateScrubberVisibility(animated: animated) } @@ -161,7 +165,7 @@ final class ChatVideoGalleryItemScrubberView: UIView { self.leftTimestampNode.status = mappedStatus self.rightTimestampNode.status = mappedStatus - if let mappedStatus = mappedStatus { + if let mappedStatus = mappedStatus, false { self.chapterDisposable.set((mappedStatus |> deliverOnMainQueue).start(next: { [weak self] status in if let strongSelf = self, status.duration > 1.0 {