Improved share error handling

This commit is contained in:
M66B
2022-11-02 18:45:14 +01:00
parent 2a4b220b7b
commit 2b7b1c83b8
3 changed files with 13 additions and 9 deletions

View File

@@ -210,7 +210,11 @@ public class AdapterImage extends RecyclerView.Adapter<AdapterImage.ViewHolder>
EntityAttachment attachment = items.get(pos);
if (attachment.available)
Helper.share(context, attachment.getFile(context), attachment.getMimeType(), attachment.name);
try {
Helper.share(context, attachment.getFile(context), attachment.getMimeType(), attachment.name);
} catch (Throwable ex) {
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
}
else {
if (attachment.progress == null) {
Bundle args = new Bundle();