mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 21:58:08 +00:00
Fix loader when sending media
This commit is contained in:
parent
0e3dbc4125
commit
6a500e19fa
1 changed files with 16 additions and 19 deletions
|
|
@ -129,7 +129,7 @@ class MultilineMessageCell: UICollectionViewCell, UICollectionViewDataSource, UI
|
|||
var chatMessageDelegate: ChatMessageDelegate? = nil
|
||||
|
||||
var indexTransferProgress: Int = -1
|
||||
var indexUploadTransferProgress: Int = -1
|
||||
var indexUploadTransferProgress: Int = 0
|
||||
|
||||
var selfIndexMessage: Int = -1
|
||||
|
||||
|
|
@ -1249,8 +1249,10 @@ class MultilineMessageCell: UICollectionViewCell, UICollectionViewDataSource, UI
|
|||
image = UIImage(named: filePath)
|
||||
}
|
||||
|
||||
ChatConversationViewModel.sharedModel.removeTmpFile(filePath: filePath)
|
||||
filePath = ""
|
||||
if VFSUtil.vfsEnabled(groupName: kLinphoneMsgNotificationAppGroupId) {
|
||||
ChatConversationViewModel.sharedModel.removeTmpFile(filePath: filePath)
|
||||
filePath = ""
|
||||
}
|
||||
|
||||
if let image {
|
||||
return image
|
||||
|
|
@ -1447,28 +1449,23 @@ class MultilineMessageCell: UICollectionViewCell, UICollectionViewDataSource, UI
|
|||
}
|
||||
})
|
||||
} else {
|
||||
if (indexUploadTransferProgress == -1) {
|
||||
for indexItem in 0...(chatMessage?.contents.count)! - 1 {
|
||||
if chatMessage?.contents[indexItem].name == content.name {
|
||||
indexUploadTransferProgress = indexItem
|
||||
break
|
||||
}
|
||||
}
|
||||
if((chatMessage?.contents.count)! > 1 && indexUploadTransferProgress > -1){
|
||||
uploadContentCollection[indexUploadTransferProgress]!.circularProgressBarView.isHidden = false
|
||||
}
|
||||
}
|
||||
print("indexUploadTransferProgressindexUploadTransferProgress \(indexUploadTransferProgress)")
|
||||
if((chatMessage?.contents.count)! > 1){
|
||||
DispatchQueue.main.async(execute: { [self] in
|
||||
if (offset == total) {
|
||||
if(indexUploadTransferProgress > -1){
|
||||
if(indexUploadTransferProgress >= 0){
|
||||
uploadContentCollection[indexUploadTransferProgress]!.circularProgressBarView.isHidden = true
|
||||
}
|
||||
indexUploadTransferProgress = -1
|
||||
} else {
|
||||
if(indexUploadTransferProgress > -1){
|
||||
uploadContentCollection[indexUploadTransferProgress]!.setUpCircularProgressBarView(toValue: p)
|
||||
if indexUploadTransferProgress <= (chatMessage?.contents.count)! {
|
||||
indexUploadTransferProgress += 1
|
||||
}else{
|
||||
indexUploadTransferProgress = 0
|
||||
}
|
||||
} else {
|
||||
if((chatMessage?.contents.count)! > 1){
|
||||
uploadContentCollection[indexUploadTransferProgress]!.circularProgressBarView.isHidden = false
|
||||
uploadContentCollection[indexUploadTransferProgress]!.setUpCircularProgressBarView(toValue: p)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue