Skip to content

Commit

Permalink
refactor: Clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Feb 10, 2025
1 parent cb8da6f commit 73c1fb9
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -788,10 +788,8 @@ class NewMessageViewModel @Inject constructor(
LocalStorageUtils.deleteAttachmentUploadDir(appContext, draftLocalUuid!!, attachment.localUuid)

mailboxContentRealm().write {
draftController.updateDraft(draftLocalUuid!!, realm = this) { draftToUpdate ->
draftToUpdate.attachments.apply {
findSpecificAttachment(attachment)?.let(::delete)
}
draftController.updateDraft(draftLocalUuid!!, realm = this) {
it.attachments.findSpecificAttachment(attachment)?.let(::delete)
}
}

Expand Down

0 comments on commit 73c1fb9

Please sign in to comment.