From e91272a4c6c89b0c6af1cc9074bdfc7187e73ba0 Mon Sep 17 00:00:00 2001 From: Conor Flynn Date: Sun, 15 Nov 2020 20:31:34 +0000 Subject: [PATCH] Adds link to account page when clicking on displayName (#1982) * Adds link to account page when clicking on displayName. * Reuses the onClickListener * Fixes formatting. --- .../keylesspalace/tusky/adapter/StatusBaseViewHolder.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java index 6216ca531..3869ca026 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java @@ -617,7 +617,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) {