Fix coverage and address PR review comment.
This commit is contained in:
parent
bd2c1c5c6c
commit
e510726359
5 changed files with 43 additions and 13 deletions
|
|
@ -84,7 +84,7 @@ class AttachmentsPreviewPresenter @AssistedInject constructor(
|
|||
) {
|
||||
val progressCallback = object : ProgressCallback {
|
||||
override fun onProgress(current: Long, total: Long) {
|
||||
sendActionState.value = SendActionState.Sending.Uploading(current.toFloat() / total)
|
||||
sendActionState.value = SendActionState.Sending.Uploading(current.toFloat() / total.toFloat())
|
||||
}
|
||||
}
|
||||
sendActionState.value = SendActionState.Sending.Processing
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ class MessageComposerPresenter @Inject constructor(
|
|||
) {
|
||||
val progressCallback = object : ProgressCallback {
|
||||
override fun onProgress(current: Long, total: Long) {
|
||||
attachmentState.value = AttachmentsState.Sending.Uploading(current.toFloat() / total)
|
||||
attachmentState.value = AttachmentsState.Sending.Uploading(current.toFloat() / total.toFloat())
|
||||
}
|
||||
}
|
||||
mediaSender.sendMedia(uri, mimeType, compressIfPossible = false, progressCallback)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue