show an indefinite loader for onion routing download

pull/295/head
Ryan ZHAO 5 years ago
parent 9cd52342e8
commit 76b6afe0e3

@ -169,10 +169,18 @@ public class ConversationMediaView: UIView {
return return
} }
let view: UIView
backgroundColor = (Theme.isDarkThemeEnabled ? .ows_gray90 : .ows_gray05) backgroundColor = (Theme.isDarkThemeEnabled ? .ows_gray90 : .ows_gray05)
let progressView = MediaDownloadView(attachmentId: attachmentId, radius: maxMessageWidth * 0.1) if isOnionRouted { // Loki: Due to the way onion routing works we can't get upload progress for those attachments
self.addSubview(progressView) let activityIndicatorView = UIActivityIndicatorView(style: .white)
progressView.autoPinEdgesToSuperviewEdges() activityIndicatorView.isHidden = false
activityIndicatorView.startAnimating()
view = activityIndicatorView
} else {
view = MediaDownloadView(attachmentId: attachmentId, radius: maxMessageWidth * 0.1)
}
addSubview(view)
view.autoPinEdgesToSuperviewEdges()
} }
private func addUploadProgressIfNecessary(_ subview: UIView) -> Bool { private func addUploadProgressIfNecessary(_ subview: UIView) -> Bool {

Loading…
Cancel
Save