Adds link to account page when clicking on displayName (#1982)

* Adds link to account page when clicking on displayName.

* Reuses the onClickListener

* Fixes formatting.
main
Conor Flynn 4 years ago committed by Alibek Omarov
parent c2c4a3a535
commit 0d644e8fe3
  1. 8
      app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java

@ -651,7 +651,13 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
final String accountId,
final String statusContent,
StatusDisplayOptions statusDisplayOptions) {
avatar.setOnClickListener(v -> listener.onViewAccount(accountId));
View.OnClickListener profileButtonClickListener = button -> {
listener.onViewAccount(accountId);
};
avatar.setOnClickListener(profileButtonClickListener);
displayName.setOnClickListener(profileButtonClickListener);
replyButton.setOnClickListener(v -> {
int position = getAdapterPosition();
if (position != RecyclerView.NO_POSITION) {

Loading…
Cancel
Save