mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed download progress for message sent & synchronized on another device
This commit is contained in:
parent
82f1e1b486
commit
f3ab328d74
1 changed files with 2 additions and 6 deletions
|
|
@ -171,10 +171,8 @@ class MessageModel @WorkerThread constructor(
|
|||
|
||||
if (messageState == ChatMessage.State.FileTransferDone) {
|
||||
Log.i("$TAG File transfer is done")
|
||||
if (!message.isOutgoing) {
|
||||
downloadingFileModel?.downloadProgress?.postValue(-1)
|
||||
downloadingFileModel = null
|
||||
}
|
||||
downloadingFileModel?.downloadProgress?.postValue(-1)
|
||||
downloadingFileModel = null
|
||||
computeContentsList()
|
||||
}
|
||||
|
||||
|
|
@ -202,8 +200,6 @@ class MessageModel @WorkerThread constructor(
|
|||
offset: Int,
|
||||
total: Int
|
||||
) {
|
||||
if (message.isOutgoing) return
|
||||
|
||||
val model = downloadingFileModel
|
||||
if (model != null) {
|
||||
val percent = ((offset * 100.0) / total).toInt() // Conversion from int to double and back to int is required
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue