Don't render download state on story thumbnails

This commit is contained in:
Nora Trapp 2022-08-10 15:58:19 -07:00 committed by Nora Trapp
parent 93342479d9
commit 2e002be110

View File

@ -40,10 +40,6 @@ class StoryThumbnailView: UIView {
blurHashImageView.autoPinEdgesToSuperviewEdges()
}
let downloadStateView = buildDownloadStateView(for: pointer)
pointerView.addSubview(downloadStateView)
downloadStateView.autoPinEdgesToSuperviewEdges()
addSubview(pointerView)
pointerView.autoPinEdgesToSuperviewEdges()
} else if let stream = attachment as? TSAttachmentStream {
@ -121,21 +117,4 @@ class StoryThumbnailView: UIView {
imageView.image = blurHashImage
return imageView
}
private static let mediaCache = CVMediaCache()
private func buildDownloadStateView(for pointer: TSAttachmentPointer) -> UIView {
let view = UIView()
let progressView = CVAttachmentProgressView(
direction: .download(attachmentPointer: pointer),
style: .withCircle,
isDarkThemeEnabled: true,
mediaCache: Self.mediaCache
)
view.addSubview(progressView)
progressView.autoSetDimensions(to: progressView.layoutSize)
progressView.autoCenterInSuperview()
return view
}
}