mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 08:39:20 +00:00
Fix file_transfer_progress_indication_recv when indexTransferProgress is equal to -1
This commit is contained in:
parent
999d989951
commit
e0e41c63e5
1 changed files with 3 additions and 4 deletions
|
|
@ -1619,7 +1619,6 @@ class MultilineMessageCell: SwipeCollectionViewCell, UICollectionViewDataSource,
|
|||
|
||||
func file_transfer_progress_indication_recv(message: ChatMessage, content: Content, offset: Int, total: Int) {
|
||||
let p = Float(offset) / Float(total)
|
||||
|
||||
if ((imagesGridCollectionView.count) > 0){
|
||||
if !message.isOutgoing {
|
||||
if (indexTransferProgress == -1) {
|
||||
|
|
@ -1630,13 +1629,13 @@ class MultilineMessageCell: SwipeCollectionViewCell, UICollectionViewDataSource,
|
|||
}
|
||||
}
|
||||
|
||||
if downloadContentCollection[indexTransferProgress] != nil {
|
||||
if (indexTransferProgress > -1 && downloadContentCollection[indexTransferProgress] != nil) {
|
||||
downloadContentCollection[indexTransferProgress]!.downloadButtonLabel.isHidden = true
|
||||
downloadContentCollection[indexTransferProgress]!.circularProgressBarView.isHidden = false
|
||||
}
|
||||
}
|
||||
DispatchQueue.main.async(execute: { [self] in
|
||||
if (offset == total) {
|
||||
if (indexTransferProgress > -1 && offset == total) {
|
||||
downloadContentCollection[indexTransferProgress] = nil
|
||||
imagesGridCollectionView[indexTransferProgress] = getImageFrom(content, forReplyBubble: false)!
|
||||
|
||||
|
|
@ -1691,7 +1690,7 @@ class MultilineMessageCell: SwipeCollectionViewCell, UICollectionViewDataSource,
|
|||
indexTransferProgress = -1
|
||||
}
|
||||
} else {
|
||||
if downloadContentCollection[indexTransferProgress] != nil {
|
||||
if (indexTransferProgress > -1 && downloadContentCollection[indexTransferProgress] != nil) {
|
||||
downloadContentCollection[indexTransferProgress]!.setUpCircularProgressBarView(toValue: p)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue