kopia lustrzana https://github.com/TeamNewPipe/NewPipe
Removed breadcrumbs customization
rodzic
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;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue