forked from mirrors/Fedilab
Fix issue #690 - Crash when visiting a profile with a lot of media
This commit is contained in:
parent
b6c908b249
commit
a7cc493922
1 changed files with 2 additions and 4 deletions
|
@ -78,11 +78,9 @@ public class ImageAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
holder.binding.media.setOnClickListener(v -> {
|
holder.binding.media.setOnClickListener(v -> {
|
||||||
Intent mediaIntent = new Intent(context, MediaActivity.class);
|
Intent mediaIntent = new Intent(context, MediaActivity.class);
|
||||||
Bundle b = new Bundle();
|
Bundle b = new Bundle();
|
||||||
b.putInt(Helper.ARG_MEDIA_POSITION, position + 1);
|
b.putInt(Helper.ARG_MEDIA_POSITION, 1);
|
||||||
ArrayList<Attachment> attachmentsTmp = new ArrayList<>();
|
ArrayList<Attachment> attachmentsTmp = new ArrayList<>();
|
||||||
for (Status status1 : statuses) {
|
attachmentsTmp.add(status.art_attachment);
|
||||||
attachmentsTmp.add(status1.art_attachment);
|
|
||||||
}
|
|
||||||
b.putSerializable(Helper.ARG_STATUS, status);
|
b.putSerializable(Helper.ARG_STATUS, status);
|
||||||
b.putSerializable(Helper.ARG_MEDIA_ARRAY, new ArrayList<>(attachmentsTmp));
|
b.putSerializable(Helper.ARG_MEDIA_ARRAY, new ArrayList<>(attachmentsTmp));
|
||||||
mediaIntent.putExtras(b);
|
mediaIntent.putExtras(b);
|
||||||
|
|
Loading…
Reference in a new issue