From 4205f5493eba5b96acef1bfa25a582988ddeedde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9lanie=20Chauvel?= Date: Tue, 7 Jul 2020 20:35:31 +0200 Subject: [PATCH] Make account views clickable instead of avatar only (#1855) Affects: - New follower request and New follower notifications - Accounts in Blocked users and Muted users pages --- .../java/com/keylesspalace/tusky/adapter/BlocksAdapter.java | 2 +- .../com/keylesspalace/tusky/adapter/FollowRequestViewHolder.kt | 2 +- .../main/java/com/keylesspalace/tusky/adapter/MutesAdapter.java | 2 +- .../com/keylesspalace/tusky/adapter/NotificationsAdapter.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/BlocksAdapter.java b/app/src/main/java/com/keylesspalace/tusky/adapter/BlocksAdapter.java index 3cc686ff..073d76da 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/BlocksAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/BlocksAdapter.java @@ -103,7 +103,7 @@ public class BlocksAdapter extends AccountAdapter { listener.onBlock(false, id, position); } }); - avatar.setOnClickListener(v -> listener.onViewAccount(id)); + itemView.setOnClickListener(v -> listener.onViewAccount(id)); } } } diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/FollowRequestViewHolder.kt b/app/src/main/java/com/keylesspalace/tusky/adapter/FollowRequestViewHolder.kt index 41a96a6f..ff87f978 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/FollowRequestViewHolder.kt +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/FollowRequestViewHolder.kt @@ -44,6 +44,6 @@ internal class FollowRequestViewHolder(itemView: View, private val showHeader: B listener.onRespondToFollowRequest(false, id, position) } } - itemView.avatar.setOnClickListener { listener.onViewAccount(id) } + itemView.setOnClickListener { listener.onViewAccount(id) } } } diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/MutesAdapter.java b/app/src/main/java/com/keylesspalace/tusky/adapter/MutesAdapter.java index db3a0ae5..34338dbb 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/MutesAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/MutesAdapter.java @@ -83,7 +83,7 @@ public class MutesAdapter extends AccountAdapter { void setupActionListener(final AccountActionListener listener) { unmute.setOnClickListener(v -> listener.onMute(false, id, getAdapterPosition())); - avatar.setOnClickListener(v -> listener.onViewAccount(id)); + itemView.setOnClickListener(v -> listener.onViewAccount(id)); } } } diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/NotificationsAdapter.java b/app/src/main/java/com/keylesspalace/tusky/adapter/NotificationsAdapter.java index 2e168a7f..936d0edf 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/NotificationsAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/NotificationsAdapter.java @@ -350,7 +350,7 @@ public class NotificationsAdapter extends RecyclerView.Adapter { } void setupButtons(final NotificationActionListener listener, final String accountId) { - avatar.setOnClickListener(v -> listener.onViewAccount(accountId)); + itemView.setOnClickListener(v -> listener.onViewAccount(accountId)); } }