Don't treat view once looping gifs as videos

This commit is contained in:
Harry 2024-05-06 10:06:44 -07:00 committed by GitHub
parent 6ff76dd7e6
commit 2e0359908c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -121,20 +121,18 @@ class ViewOnceMessageViewController: OWSViewController {
}
let viewOnceType: Content.ContentType
if attachmentRef.renderingFlag == .shouldLoop {
switch attachmentStream.computeContentType() {
case .animatedImage:
viewOnceType = .animatedImage
case .image:
viewOnceType = .stillImage
case .video where attachmentRef.renderingFlag == .shouldLoop:
viewOnceType = .loopingVideo
} else {
switch attachmentStream.computeContentType() {
case .animatedImage:
viewOnceType = .animatedImage
case .image:
viewOnceType = .stillImage
case .video:
viewOnceType = .video
case .audio, .file:
owsFailDebug("Unexpected content type.")
return
}
case .video:
viewOnceType = .video
case .audio, .file:
owsFailDebug("Unexpected content type.")
return
}
// To ensure that we never show the content more than once,