Fix click issue

This commit is contained in:
tom79 2019-10-31 13:48:13 +01:00
parent c3c7d1bc31
commit 0d80dcffed
1 changed files with 16 additions and 19 deletions

View File

@ -3456,29 +3456,26 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
holder.status_account_profile.setOnClickListener(new View.OnClickListener() { holder.status_account_profile.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (status.getReblog() != null) {
if (targetedId == null || !targetedId.equals(status.getAccount().getId())) { if (targetedId == null || !targetedId.equals(status.getReblog().getAccount().getId())) {
Intent intent = new Intent(context, ShowAccountActivity.class); Intent intent = new Intent(context, ShowAccountActivity.class);
Bundle b = new Bundle(); Bundle b = new Bundle();
b.putParcelable("account", status.getAccount()); b.putParcelable("account", status.getReblog().getAccount());
intent.putExtras(b); intent.putExtras(b);
context.startActivity(intent); context.startActivity(intent);
}
} else {
if (targetedId == null || !targetedId.equals(status.getAccount().getId())) {
Intent intent = new Intent(context, ShowAccountActivity.class);
Bundle b = new Bundle();
b.putParcelable("account", status.getAccount());
intent.putExtras(b);
context.startActivity(intent);
}
} }
} }
}); });
holder.status_account_profile.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (targetedId == null || !targetedId.equals(status.getReblog().getAccount().getId())) {
Intent intent = new Intent(context, ShowAccountActivity.class);
Bundle b = new Bundle();
b.putParcelable("account", status.getReblog().getAccount());
intent.putExtras(b);
context.startActivity(intent);
}
}
});
} else { } else {
holder.status_account_profile.setOnClickListener(new View.OnClickListener() { holder.status_account_profile.setOnClickListener(new View.OnClickListener() {
@Override @Override