mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-22 00:01:00 +00:00
Hide indicator if placeholder is present
This commit is contained in:
parent
9c5f350480
commit
1746cdf5ad
2 changed files with 8 additions and 0 deletions
|
@ -114,6 +114,10 @@ final class ImageViewController: UIViewController {
|
||||||
let placeholderKey = viewModel.attachment.previewUrl?.absoluteString
|
let placeholderKey = viewModel.attachment.previewUrl?.absoluteString
|
||||||
let placeholderImage = SDImageCache.shared.imageFromCache(forKey: placeholderKey)
|
let placeholderImage = SDImageCache.shared.imageFromCache(forKey: placeholderKey)
|
||||||
|
|
||||||
|
if placeholderImage != nil {
|
||||||
|
imageView.sd_imageIndicator = nil
|
||||||
|
}
|
||||||
|
|
||||||
imageView.sd_setImage(with: viewModel.attachment.url, placeholderImage: placeholderImage)
|
imageView.sd_setImage(with: viewModel.attachment.url, placeholderImage: placeholderImage)
|
||||||
case .gifv:
|
case .gifv:
|
||||||
playerView.tag = viewModel.tag
|
playerView.tag = viewModel.tag
|
||||||
|
|
|
@ -146,6 +146,10 @@ private extension EditThumbnailView {
|
||||||
let placeholderKey = viewModel.attachment.previewUrl?.absoluteString
|
let placeholderKey = viewModel.attachment.previewUrl?.absoluteString
|
||||||
let placeholderImage = SDImageCache.shared.imageFromCache(forKey: placeholderKey)
|
let placeholderImage = SDImageCache.shared.imageFromCache(forKey: placeholderKey)
|
||||||
|
|
||||||
|
if placeholderImage != nil {
|
||||||
|
imageView.sd_imageIndicator = nil
|
||||||
|
}
|
||||||
|
|
||||||
imageView.sd_setImage(with: viewModel.attachment.url, placeholderImage: placeholderImage)
|
imageView.sd_setImage(with: viewModel.attachment.url, placeholderImage: placeholderImage)
|
||||||
case .gifv:
|
case .gifv:
|
||||||
imageView.isHidden = true
|
imageView.isHidden = true
|
||||||
|
|
Loading…
Reference in a new issue