Fix playing gifs from a background thread
This commit is contained in:
parent
4ac76ab672
commit
0a11d2de47
|
@ -165,7 +165,9 @@ class AttachmentView: UIImageView, GIFAnimatable {
|
||||||
if self.attachment.url.pathExtension == "gif" {
|
if self.attachment.url.pathExtension == "gif" {
|
||||||
self.source = .gifData(attachmentURL, data)
|
self.source = .gifData(attachmentURL, data)
|
||||||
if self.autoplayGifs {
|
if self.autoplayGifs {
|
||||||
|
DispatchQueue.main.async {
|
||||||
self.animate(withGIFData: data)
|
self.animate(withGIFData: data)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
self.displayImage()
|
self.displayImage()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue