Preclude cancelation of pre-uploaded video attachments.

Addresses ##10225.
This commit is contained in:
Nicholas Tinsley
2024-08-30 12:23:26 -04:00
parent 2b1bbdda15
commit d683b8a321
13 changed files with 137 additions and 56 deletions

View File

@@ -1941,6 +1941,10 @@ class ConversationFragment :
onComplete = {
onSendComplete()
afterSendComplete()
},
onError = {
Log.w(TAG, "Error received during send!", it)
toast(R.string.ConversationActivity_error_sending_media)
}
)
}

View File

@@ -225,7 +225,7 @@ class ConversationRepository(
emitter.onComplete()
}
} else {
MessageSender.sendPushWithPreUploadedMedia(
val sendSuccessful = MessageSender.sendPushWithPreUploadedMedia(
AppDependencies.application,
message,
preUploadResults,
@@ -233,6 +233,10 @@ class ConversationRepository(
) {
emitter.onComplete()
}
if (!sendSuccessful) {
emitter.tryOnError(IllegalStateException("Could not send pre-uploaded attachments because they did not exist!"))
}
}
}