From b88416a931eeb483fa594438398549140fde0177 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Wed, 5 Dec 2018 14:03:28 -0500 Subject: [PATCH] Apply dark theme changes to media downloads. --- .../ConversationView/Cells/ConversationMediaView.swift | 4 ++-- .../ConversationView/Cells/MediaDownloadView.swift | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/Cells/ConversationMediaView.swift b/Signal/src/ViewControllers/ConversationView/Cells/ConversationMediaView.swift index d1061461e..36a334713 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/ConversationMediaView.swift +++ b/Signal/src/ViewControllers/ConversationView/Cells/ConversationMediaView.swift @@ -102,7 +102,7 @@ public class ConversationMediaView: UIView { return } - backgroundColor = UIColor.ows_gray05 + backgroundColor = (Theme.isDarkThemeEnabled ? .ows_gray90 : .ows_gray05) let progressView = MediaDownloadView(attachmentId: attachmentId, radius: maxMessageWidth * 0.1) self.addSubview(progressView) progressView.autoPinEdgesToSuperviewEdges() @@ -288,7 +288,7 @@ public class ConversationMediaView: UIView { } private func configure(forError error: MediaError) { - backgroundColor = UIColor.ows_gray05 + backgroundColor = (Theme.isDarkThemeEnabled ? .ows_gray90 : .ows_gray05) let icon: UIImage switch (error) { case .failed: diff --git a/Signal/src/ViewControllers/ConversationView/Cells/MediaDownloadView.swift b/Signal/src/ViewControllers/ConversationView/Cells/MediaDownloadView.swift index e7b5dfa52..5be0d8034 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/MediaDownloadView.swift +++ b/Signal/src/ViewControllers/ConversationView/Cells/MediaDownloadView.swift @@ -92,7 +92,8 @@ public class MediaDownloadView: UIView { bezierPath.addArc(withCenter: center, radius: innerRadius, startAngle: endAngle, endAngle: startAngle, clockwise: false) shapeLayer.path = bezierPath.cgPath - shapeLayer.fillColor = UIColor.ows_gray60.cgColor + let fillColor: UIColor = (Theme.isDarkThemeEnabled ? .ows_gray45 : .ows_gray60) + shapeLayer.fillColor = fillColor.cgColor CATransaction.commit() }