Skip to content

Commit

Permalink
refactor: Now that there is only 2 statuses, simplify a condition
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Mar 10, 2025
1 parent 02207b5 commit 4602053
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ class NewMessageViewModel @Inject constructor(
* be some data for Attachments in Realm (for example, the `uuid`). If we don't take back the Realm version of the
* Attachment, this data will be lost forever and we won't be able to save/send the Draft.
*/
return@map if (localAttachment != null && localAttachment.attachmentUploadStatus != AttachmentUploadStatus.AWAITING) {
return@map if (localAttachment != null && localAttachment.attachmentUploadStatus == AttachmentUploadStatus.FINISHED) {
localAttachment.copyFromRealm()
} else {
uiAttachment
Expand Down

0 comments on commit 4602053

Please sign in to comment.