Skip to content

Commit

Permalink
Simplify saveAttachmentTo()
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed May 28, 2024
1 parent d9d238b commit 6213fae
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ object LocalStorageUtils {

body?.byteStream()?.use { inputStream ->
saveAttachmentToCacheDir(inputStream, outputFile)
return true
return false
}

return false
return true
}

val attachment = runCatching { localAttachment.resource?.let(ApiRepository::downloadAttachment) }.getOrNull()
Expand Down

0 comments on commit 6213fae

Please sign in to comment.