mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
fix crash when quoted attachment's content type is null
This commit is contained in:
parent
cebda588e8
commit
bd73f14915
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,7 @@ final class QuoteView : UIView {
|
|||
if !hasAttachments {
|
||||
mainStackView.addArrangedSubview(lineView)
|
||||
} else {
|
||||
let isAudio = MIMETypeUtil.isAudio(attachments.first!.contentType!)
|
||||
let isAudio = MIMETypeUtil.isAudio(attachments.first!.contentType ?? "")
|
||||
let fallbackImageName = isAudio ? "attachment_audio" : "actionsheet_document_black"
|
||||
let fallbackImage = UIImage(named: fallbackImageName)?.withTint(.white)?.resizedImage(to: CGSize(width: iconSize, height: iconSize))
|
||||
let imageView = UIImageView(image: thumbnail ?? fallbackImage)
|
||||
|
|
Loading…
Reference in a new issue