diff --git a/Riot/Model/Room/RoomDataSource.m b/Riot/Model/Room/RoomDataSource.m index a09745a8f..e6401e54d 100644 --- a/Riot/Model/Room/RoomDataSource.m +++ b/Riot/Model/Room/RoomDataSource.m @@ -391,6 +391,9 @@ } } } + + // Auto animate the sticker in case of animated gif + bubbleCell.isAutoAnimatedGif = (cellData.attachment && cellData.attachment.type == MXKAttachmentTypeSticker); } return cell; diff --git a/Riot/Views/RoomBubbleList/RoomSelectedStickerBubbleCell.m b/Riot/Views/RoomBubbleList/RoomSelectedStickerBubbleCell.m index 5ebd326ef..6df642c36 100644 --- a/Riot/Views/RoomBubbleList/RoomSelectedStickerBubbleCell.m +++ b/Riot/Views/RoomBubbleList/RoomSelectedStickerBubbleCell.m @@ -136,15 +136,7 @@ { mimetype = bubbleData.attachment.contentInfo[@"mimetype"]; } - if ([mimetype isEqualToString:@"image/gif"]) - { - self.fileTypeIconView.image = [NSBundle mxk_imageFromMXKAssetsBundleWithName:@"filetype-gif"]; - self.fileTypeIconView.hidden = NO; - } - else - { - self.fileTypeIconView.hidden = YES; - } + // Display the sticker self.attachmentView.backgroundColor = [UIColor clearColor]; self.attachmentView.mediaFolder = bubbleData.roomId; @@ -163,16 +155,9 @@ self.descriptionContainerView.hidden = YES; } - // @TODO: check whether we need the progress view or not. Remove it if it is useless. - self.progressView.hidden = YES; - // Adjust Attachment width constant self.attachViewWidthConstraint.constant = contentSize.width; -// // Add a long gesture recognizer on progressView to cancel the current operation (Note: only the download can be cancelled). -// UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(onLongPressGesture:)]; -// [self.progressView addGestureRecognizer:longPress]; - // Handle the encryption view if (bubbleData.isEncryptedRoom) { @@ -200,7 +185,6 @@ } frame = cell.attachmentView.frame; self.attachViewLeadingConstraint.constant = frame.origin.x; - self.pictureView.frame = cell.pictureView.frame; self.attachViewTopConstraint.constant = cell.attachViewTopConstraint.constant; self.attachViewBottomConstraint.constant = cell.attachViewBottomConstraint.constant; self.bubbleInfoContainerTopConstraint.constant = cell.bubbleInfoContainerTopConstraint.constant; diff --git a/Riot/Views/RoomBubbleList/RoomSelectedStickerBubbleCell.xib b/Riot/Views/RoomBubbleList/RoomSelectedStickerBubbleCell.xib index f0ae78878..3f1198ef3 100644 --- a/Riot/Views/RoomBubbleList/RoomSelectedStickerBubbleCell.xib +++ b/Riot/Views/RoomBubbleList/RoomSelectedStickerBubbleCell.xib @@ -1,11 +1,11 @@ - + - + @@ -86,14 +86,6 @@ - -