From a14e8647311133da62ccd638851cd31cf1f52892 Mon Sep 17 00:00:00 2001 From: FineFindus Date: Fri, 19 May 2023 20:41:37 +0200 Subject: [PATCH] feat(settings): allow complete button row to be clicked --- .../android/fragments/settings/SettingsBaseFragment.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsBaseFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsBaseFragment.java index 4546aeb06..837c05d7b 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsBaseFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsBaseFragment.java @@ -765,7 +765,7 @@ public abstract class SettingsBaseFragment extends MastodonToolbarFragment imple } } - protected class ButtonViewHolder extends BindableViewHolder{ + protected class ButtonViewHolder extends BindableViewHolder implements UsableRecyclerView.Clickable{ private final Button button; private final ImageView icon; private final TextView title; @@ -792,6 +792,11 @@ public abstract class SettingsBaseFragment extends MastodonToolbarFragment imple icon.setImageResource(item.icon); item.buttonConsumer.accept(button); } + + @Override + public void onClick() { + button.performClick(); + } } protected class TextViewHolder extends BindableViewHolder implements UsableRecyclerView.Clickable{