Respond to CR.

This commit is contained in:
Matthew Chen 2018-12-12 10:06:21 -05:00
parent 962c1acc9f
commit 21ab3fbbcb

View file

@ -214,11 +214,15 @@ public class ConversationMediaView: UIView {
loadBlock = { [weak self] in
AssertIsOnMainThread()
guard let strongSelf = self else {
return
}
if animatedImageView.image != nil {
owsFailDebug("Unexpectedly already loaded.")
return
}
self?.tryToLoadMedia(loadMediaBlock: { () -> AnyObject? in
strongSelf.tryToLoadMedia(loadMediaBlock: { () -> AnyObject? in
guard attachmentStream.isValidImage else {
owsFailDebug("Ignoring invalid attachment.")
return nil