Skip to content

Commit dacba48

Browse files
committed
chores(Sentry): Remove resolved Sentry !
1 parent 2ceb009 commit dacba48

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

app/src/main/java/com/infomaniak/mail/ui/newMessage/NewMessageViewModel.kt

+7-12
Original file line numberDiff line numberDiff line change
@@ -772,18 +772,13 @@ class NewMessageViewModel @Inject constructor(
772772
if (recipient.isDisplayedAsExternal) appContext.trackExternalEvent("deleteRecipient")
773773
}
774774

775-
fun deleteAttachment(position: Int) {
776-
runCatching {
777-
val attachments = attachmentsLiveData.valueOrEmpty().toMutableList()
778-
val attachment = attachments[position]
779-
attachment.getUploadLocalFile()?.delete()
780-
LocalStorageUtils.deleteAttachmentUploadDir(appContext, draftLocalUuid!!, attachment.localUuid)
781-
attachments.removeAt(position)
782-
attachmentsLiveData.value = attachments
783-
}.onFailure { exception ->
784-
// TODO: If we don't see this Sentry after mid-2024, we can remove it.
785-
SentryLog.e(TAG, " Attachment $position doesn't exist", exception)
786-
}
775+
fun deleteAttachment(position: Int) = runCatching {
776+
val attachments = attachmentsLiveData.valueOrEmpty().toMutableList()
777+
val attachment = attachments[position]
778+
attachment.getUploadLocalFile()?.delete()
779+
LocalStorageUtils.deleteAttachmentUploadDir(appContext, draftLocalUuid!!, attachment.localUuid)
780+
attachments.removeAt(position)
781+
attachmentsLiveData.value = attachments
787782
}
788783

789784
fun updateIsSendingAllowed(

0 commit comments

Comments
 (0)