diff options
Diffstat (limited to 'src/main/java/de')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/adapter/MediaPreviewAdapter.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MediaPreviewAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MediaPreviewAdapter.java index ae4c42816..64cb63439 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MediaPreviewAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MediaPreviewAdapter.java @@ -81,7 +81,11 @@ public class MediaPreviewAdapter extends RecyclerView.Adapter<MediaPreviewAdapte } holder.binding.deleteButton.setOnClickListener(v -> { int pos = mediaPreviews.indexOf(attachment); - mediaPreviews.remove(pos); + try { + mediaPreviews.remove(pos); + } catch (Exception e) { + e.printStackTrace(); + } notifyItemRemoved(pos); conversationFragment.toggleInputMethod(); }); |