forked from mirrors/linphone-iphone
Fix UIImage when content.filePath is nil
This commit is contained in:
parent
2db146787e
commit
70ff69aa63
1 changed files with 5 additions and 1 deletions
|
|
@ -1215,10 +1215,14 @@ class MultilineMessageCell: SwipeCollectionViewCell, UICollectionViewDataSource,
|
|||
|
||||
ChatConversationViewModel.sharedModel.removeTmpFile(filePath: plainFile)
|
||||
plainFile = ""
|
||||
}else{
|
||||
}else if content.filePath != nil {
|
||||
if let imageMessage = UIImage(named: content.filePath!){
|
||||
self.imageViewBubble.image = self.resizeImage(image: imageMessage, targetSize: CGSize(width: UIScreen.main.bounds.size.width*3/4, height: 300.0))
|
||||
}
|
||||
} else {
|
||||
if let imageMessage = UIImage(named: "file_default"){
|
||||
self.imageViewBubble.image = self.resizeImage(image: imageMessage, targetSize: CGSize(width: UIScreen.main.bounds.size.width*3/4, height: 300.0))
|
||||
}
|
||||
}
|
||||
|
||||
if(content.isFile){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue