mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-05-20 08:17:09 +02:00
fix(YouTube - SponsorBlock): Fix segment category summary not showing category description
This commit is contained in:
parent
cf6ad613a6
commit
06934a60d9
@ -53,7 +53,7 @@ public class SegmentCategoryListPreference extends ListPreference {
|
||||
setEntryValues(isHighlightCategory
|
||||
? CategoryBehaviour.getBehaviorKeyValuesWithoutSkipOnce()
|
||||
: CategoryBehaviour.getBehaviorKeyValues());
|
||||
setSummary(category.description.toString());
|
||||
super.setSummary(category.description.toString());
|
||||
|
||||
updateUI();
|
||||
}
|
||||
@ -268,4 +268,13 @@ public class SegmentCategoryListPreference extends ListPreference {
|
||||
private void updateOpacityText() {
|
||||
opacityEditText.setText(String.format(Locale.US, "%.2f", categoryOpacity));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSummary(CharSequence summary) {
|
||||
// Ignore calls to set the summary.
|
||||
// Summary is always the description of the category.
|
||||
//
|
||||
// This is required otherwise the ReVanced preference fragment
|
||||
// sets all ListPreference summaries to show the current selection.
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user