Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
KnollFrank committed Dec 19, 2024
1 parent 0747499 commit e72f6fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,10 @@ public Optional<PreferenceDialogAndSearchableInfoByPreferenceDialogProvider<?>>
final Preference preference,
final PreferenceFragmentCompat hostOfPreference) {
// FK-TODO: handle more preference dialogs, which shall be searchable
if (hostOfPreference instanceof final SearchablePreferenceDialogProvider searchablePreferenceDialogProvider) {
return searchablePreferenceDialogProvider.getPreferenceDialogAndSearchableInfoByPreferenceDialogProvider(preference);
}
if (hostOfPreference instanceof final ShowableSearchablePreferenceDialogProvider showableSearchablePreferenceDialogProvider) {
return showableSearchablePreferenceDialogProvider
.getShowableSearchablePreferenceDialog(preference, null)
.map(ShowableSearchablePreferenceDialog::asPreferenceDialogAndSearchableInfoByPreferenceDialogProvider);
}
return Optional.empty();
return hostOfPreference instanceof final ShowableSearchablePreferenceDialogProvider showableSearchablePreferenceDialogProvider ?
showableSearchablePreferenceDialogProvider
.getShowableSearchablePreferenceDialog(preference, null)
.map(ShowableSearchablePreferenceDialog::asPreferenceDialogAndSearchableInfoByPreferenceDialogProvider) :
Optional.empty();
}
}

This file was deleted.

0 comments on commit e72f6fe

Please sign in to comment.