Merge branch 'charlesmchen/darkThemeVsMediaDownloads'

This commit is contained in:
Matthew Chen 2018-12-07 09:12:44 -05:00
commit d48cc08237
2 changed files with 4 additions and 3 deletions

View File

@ -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:

View File

@ -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()
}