Skip to content

Commit

Permalink
Fix #421 (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
7heo authored Jun 6, 2023
1 parent 90ccfe6 commit 930e416
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,12 @@ fun CreatePostActivity(
suggestedTitle = createPostViewModel.suggestedTitle,
image = _image,
onPickedImage = { uri ->
val imageIs = imageInputStreamFromUri(ctx, uri)
scope.launch {
account?.also { acct ->
url = uploadPictrsImage(acct, imageIs, ctx).orEmpty()
if (uri != null && uri != Uri.EMPTY) {
val imageIs = imageInputStreamFromUri(ctx, uri)
scope.launch {
account?.also { acct ->
url = uploadPictrsImage(acct, imageIs, ctx).orEmpty()
}
}
}
},
Expand Down

0 comments on commit 930e416

Please sign in to comment.