Show the throwable error message when an upload fails (#3838)

This commit is contained in:
Nik Clayton 2023-07-26 23:36:29 +02:00 committed by GitHub
parent 8d612375e5
commit e852aa64a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -485,7 +485,12 @@ class ComposeActivity :
if (throwable is UploadServerError) {
displayTransientMessage(throwable.errorMessage)
} else {
displayTransientMessage(R.string.error_media_upload_sending)
displayTransientMessage(
getString(
R.string.error_media_upload_sending_fmt,
throwable.message
)
)
}
}
}

View file

@ -38,6 +38,7 @@
<string name="error_media_download_permission">Permission to store media is required.</string>
<string name="error_media_upload_image_or_video">Images and videos cannot both be attached to the same post.</string>
<string name="error_media_upload_sending">The upload failed.</string>
<string name="error_media_upload_sending_fmt">The upload failed: %s</string>
<string name="error_sender_account_gone">Error sending post.</string>
<string name="error_following_hashtag_format">Error following #%s</string>
<string name="error_unfollowing_hashtag_format">Error unfollowing #%s</string>