Hide indicator if placeholder is present

This commit is contained in:
Justin Mazzocchi 2021-02-27 14:33:03 -08:00
parent 9c5f350480
commit 1746cdf5ad
No known key found for this signature in database
GPG Key ID: E223E6937AAFB01C
2 changed files with 8 additions and 0 deletions

View File

@ -114,6 +114,10 @@ final class ImageViewController: UIViewController {
let placeholderKey = viewModel.attachment.previewUrl?.absoluteString
let placeholderImage = SDImageCache.shared.imageFromCache(forKey: placeholderKey)
if placeholderImage != nil {
imageView.sd_imageIndicator = nil
}
imageView.sd_setImage(with: viewModel.attachment.url, placeholderImage: placeholderImage)
case .gifv:
playerView.tag = viewModel.tag

View File

@ -146,6 +146,10 @@ private extension EditThumbnailView {
let placeholderKey = viewModel.attachment.previewUrl?.absoluteString
let placeholderImage = SDImageCache.shared.imageFromCache(forKey: placeholderKey)
if placeholderImage != nil {
imageView.sd_imageIndicator = nil
}
imageView.sd_setImage(with: viewModel.attachment.url, placeholderImage: placeholderImage)
case .gifv:
imageView.isHidden = true