Fix a crash for click on boosted media
This commit is contained in:
parent
aa7d4ab054
commit
2b33c044b7
|
@ -2989,12 +2989,17 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if( status.isAttachmentShown()) {
|
if( status.isAttachmentShown()) {
|
||||||
|
|
||||||
|
ArrayList<Attachment> attachmentArrayList;
|
||||||
|
if( status.getReblog() == null)
|
||||||
|
attachmentArrayList = status.getMedia_attachments();
|
||||||
|
else
|
||||||
|
attachmentArrayList = status.getReblog().getMedia_attachments();
|
||||||
if (attachment.getType().equals("web")) {
|
if (attachment.getType().equals("web")) {
|
||||||
Helper.openBrowser(context, attachment.getUrl());
|
Helper.openBrowser(context, attachment.getUrl());
|
||||||
} else {
|
} else {
|
||||||
Intent intent = new Intent(context, MediaActivity.class);
|
Intent intent = new Intent(context, MediaActivity.class);
|
||||||
Bundle b = new Bundle();
|
Bundle b = new Bundle();
|
||||||
intent.putParcelableArrayListExtra("mediaArray", status.getMedia_attachments());
|
intent.putParcelableArrayListExtra("mediaArray", attachmentArrayList);
|
||||||
b.putInt("position", finalPosition);
|
b.putInt("position", finalPosition);
|
||||||
intent.putExtras(b);
|
intent.putExtras(b);
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
|
|
Loading…
Reference in New Issue