Check of previousEvent is nil in isFirstIndexInTableView

This commit is contained in:
Benoit Martins 2023-05-22 14:22:04 +02:00 committed by QuentinArguillere
parent e0e41c63e5
commit ae974b933c

View file

@ -1747,7 +1747,7 @@ class MultilineMessageCell: SwipeCollectionViewCell, UICollectionViewDataSource,
let indexOfPreviousEvent = indexPath.row + 1
previousEvent = ChatConversationTableViewModel.sharedModel.getMessage(index: indexPath.row+1)
if (indexOfPreviousEvent > -1 && indexOfPreviousEvent < ChatConversationTableViewModel.sharedModel.getNBMessages()) {
if ((previousEvent?.type.rawValue)! != LinphoneEventLogTypeConferenceChatMessage.rawValue) {
if (previousEvent?.type != nil && (previousEvent?.type.rawValue)! != LinphoneEventLogTypeConferenceChatMessage.rawValue) {
return true
}
}