feat(settings): allow complete button row to be clicked

This commit is contained in:
FineFindus
2023-05-19 20:41:37 +02:00
parent a87da87aad
commit a14e864731

View File

@@ -765,7 +765,7 @@ public abstract class SettingsBaseFragment extends MastodonToolbarFragment imple
}
}
protected class ButtonViewHolder extends BindableViewHolder<ButtonItem>{
protected class ButtonViewHolder extends BindableViewHolder<ButtonItem> 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<TextItem> implements UsableRecyclerView.Clickable{