mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-22 11:02:35 +01:00
Removed breadcrumbs customization
This commit is contained in:
parent
e2f449f0c8
commit
03bb2123f2
@ -171,7 +171,6 @@ public class SettingsActivity extends AppCompatActivity implements
|
||||
@Override
|
||||
public boolean onPreferenceStartFragment(final PreferenceFragmentCompat caller,
|
||||
final Preference preference) {
|
||||
preference.getExtras()
|
||||
showSettingsFragment(instantiateFragment(preference.getFragment()));
|
||||
return true;
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Parses the corresponding preference-file(s).
|
||||
@ -82,7 +83,7 @@ public class PreferenceParser {
|
||||
private String joinBreadcrumbs(final List<String> breadcrumbs) {
|
||||
return breadcrumbs.stream()
|
||||
.filter(crumb -> !TextUtils.isEmpty(crumb))
|
||||
.reduce("", searchConfiguration.getBreadcrumbConcat());
|
||||
.collect(Collectors.joining(" > "));
|
||||
}
|
||||
|
||||
private String getAttribute(
|
||||
|
@ -12,9 +12,6 @@ import java.util.function.BinaryOperator;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class PreferenceSearchConfiguration {
|
||||
private BinaryOperator<String> breadcrumbConcat =
|
||||
(s1, s2) -> TextUtils.isEmpty(s1) ? s2 : (s1 + " > " + s2);
|
||||
|
||||
private PreferenceSearchFunction searcher = new PreferenceFuzzySearchFunction();
|
||||
|
||||
private final List<String> parserIgnoreElements = Arrays.asList(
|
||||
@ -24,18 +21,10 @@ public class PreferenceSearchConfiguration {
|
||||
PreferenceScreen.class.getSimpleName());
|
||||
|
||||
|
||||
public void setBreadcrumbConcat(final BinaryOperator<String> breadcrumbConcat) {
|
||||
this.breadcrumbConcat = Objects.requireNonNull(breadcrumbConcat);
|
||||
}
|
||||
|
||||
public void setSearcher(final PreferenceSearchFunction searcher) {
|
||||
this.searcher = Objects.requireNonNull(searcher);
|
||||
}
|
||||
|
||||
public BinaryOperator<String> getBreadcrumbConcat() {
|
||||
return breadcrumbConcat;
|
||||
}
|
||||
|
||||
public PreferenceSearchFunction getSearcher() {
|
||||
return searcher;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user