|
@@ -48,12 +48,11 @@ class ImageTextCell: BaseMessageCell {
|
|
|
mainContentView.spacing = msg.text?.isEmpty ?? false ? 0 : 6
|
|
|
topCompactView = msg.quoteText == nil ? true : false
|
|
|
tag = msg.id
|
|
|
- if msg.type == DC_MSG_IMAGE, let image = msg.image {
|
|
|
- contentImageView.image = image
|
|
|
- accessibilityLabel = String.localized("image")
|
|
|
- playButtonView.isHidden = true
|
|
|
- setAspectRatioFor(message: msg)
|
|
|
- } else if msg.type == DC_MSG_GIF, let url = msg.fileURL {
|
|
|
+
|
|
|
+ if let url = msg.fileURL,
|
|
|
+ ((msg.type == DC_MSG_GIF) ||
|
|
|
+ msg.type == DC_MSG_STICKER ||
|
|
|
+ (msg.type == DC_MSG_IMAGE && url.pathExtension == "webp")) {
|
|
|
contentImageView.sd_setImage(with: url,
|
|
|
placeholderImage: UIImage(color: UIColor.init(alpha: 0,
|
|
|
red: 255,
|
|
@@ -63,6 +62,11 @@ class ImageTextCell: BaseMessageCell {
|
|
|
playButtonView.isHidden = true
|
|
|
accessibilityLabel = String.localized("gif")
|
|
|
setAspectRatioFor(message: msg)
|
|
|
+ } else if msg.type == DC_MSG_IMAGE, let image = msg.image {
|
|
|
+ contentImageView.image = image
|
|
|
+ accessibilityLabel = String.localized("image")
|
|
|
+ playButtonView.isHidden = true
|
|
|
+ setAspectRatioFor(message: msg)
|
|
|
} else if msg.type == DC_MSG_VIDEO, let url = msg.fileURL {
|
|
|
playButtonView.isHidden = false
|
|
|
accessibilityLabel = String.localized("video")
|