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
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B
1 changed files with 6 additions and 1 deletions

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{