Skip to content

Commit

Permalink
Fix file display during transfer, disable message information when th…
Browse files Browse the repository at this point in the history
…e message is not sent, refresh of recording file when download is complete
  • Loading branch information
benoit-martins committed Dec 19, 2023
1 parent 723227b commit 6cf84fd
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 151 deletions.
16 changes: 11 additions & 5 deletions Classes/Swift/Chat/Views/ChatConversationTableViewSwift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,13 @@ class ChatConversationTableViewSwift: UIViewController, UICollectionViewDataSour
self.collectionView.scrollToItem(at: IndexPath(item: 0, section: 0), at: .top, animated: animated)
}
ChatConversationViewSwift.markAsRead(ChatConversationViewModel.sharedModel.chatRoom?.getCobject)
self.floatingScrollButton?.isHidden = true
self.floatingScrollBackground?.isHidden = true
scrollBadge!.text = "0"
if self.floatingScrollButton != nil && self.floatingScrollBackground != nil {
self.floatingScrollButton!.isHidden = true
self.floatingScrollBackground!.isHidden = true
}
if scrollBadge != nil {
scrollBadge!.text = "0"
}
}

func refreshDataAfterForeground(){
Expand Down Expand Up @@ -241,7 +245,7 @@ class ChatConversationTableViewSwift: UIViewController, UICollectionViewDataSour
}
}

if (!cell.imageViewBubble.isHidden || !cell.imageVideoViewBubble.isHidden){
if (!cell.imageViewBubble.isHidden || !cell.imageVideoViewBubble.isHidden) && cell.chatMessage != nil && !cell.chatMessage!.isFileTransferInProgress {
cell.imageViewBubble.onClick {
self.onImageClick(chatMessage: cell.chatMessage!, index: indexPath.row)
}
Expand Down Expand Up @@ -345,7 +349,9 @@ class ChatConversationTableViewSwift: UIViewController, UICollectionViewDataSour
case VoipTexts.bubble_chat_dropDown_reply:
self!.replyMessage(message: event.chatMessage!)
case VoipTexts.bubble_chat_dropDown_infos:
self!.infoMessage(event: event)
if !event.chatMessage!.isFileTransferInProgress && !(event.chatMessage!.state.rawValue == LinphoneChatMessageStateNotDelivered.rawValue || event.chatMessage!.state.rawValue == LinphoneChatMessageStateFileTransferError.rawValue) {
self!.infoMessage(event: event)
}
case VoipTexts.bubble_chat_dropDown_add_to_contact:
self!.addToContacts(message: event.chatMessage!)
case VoipTexts.bubble_chat_dropDown_delete:
Expand Down
Loading

0 comments on commit 6cf84fd

Please sign in to comment.