Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,10 @@ class DownloadAttachmentViewModel(val attachmentInfo: AttachmentInfo, applicatio
}
}

val email =
attachmentInfo.email ?: return@withContext Result.success(byteArrayOf())
val account = getAccountEntityWithDecryptedInfoSuspend(
roomDatabase.accountDao().getAccount(email)
) ?: return@withContext Result.success(byteArrayOf())
val email = requireNotNull(attachmentInfo.email)
val account = requireNotNull(
getAccountEntityWithDecryptedInfoSuspend(roomDatabase.accountDao().getAccount(email))
)

if (account.useAPI) {
when (account.accountType) {
Expand Down