Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
KnollFrank committed Dec 15, 2024
1 parent ae9b8d5 commit 47f5b91
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,16 +271,14 @@ public boolean onPreferenceClick(Preference preference) {

@Override
public void onDisplayPreferenceDialog(Preference preference) {
final Optional<SearchablePreferenceDialog> preferenceDialog =
createPreferenceDialog(
this
.createPreferenceDialog(
preference,
this,
false);
if (preferenceDialog.isPresent()) {
show(preferenceDialog.get());
} else {
super.onDisplayPreferenceDialog(preference);
}
false)
.ifPresentOrElse(
this::show,
() -> super.onDisplayPreferenceDialog(preference));
}

private void show(final SearchablePreferenceDialog dialog) {
Expand Down

0 comments on commit 47f5b91

Please sign in to comment.