fix(YouTube - SponsorBlock): Fix segment category summary not showing category description

This commit is contained in:
LisoUseInAIKyrios 2025-05-18 12:25:43 +04:00
parent cf6ad613a6
commit 06934a60d9

View File

@ -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.
}
}