Skip to content

Commit b2b09a2

Browse files
author
LisoUseInAIKyrios
committed
fix(YouTube - SponsorBlock): Fix segment category summary not showing category description
1 parent 4a3a7f1 commit b2b09a2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

extensions/youtube/src/main/java/app/revanced/extension/youtube/sponsorblock/objects/SegmentCategoryListPreference.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public SegmentCategoryListPreference(Context context, SegmentCategory category)
5353
setEntryValues(isHighlightCategory
5454
? CategoryBehaviour.getBehaviorKeyValuesWithoutSkipOnce()
5555
: CategoryBehaviour.getBehaviorKeyValues());
56-
setSummary(category.description.toString());
56+
super.setSummary(category.description.toString());
5757

5858
updateUI();
5959
}
@@ -268,4 +268,13 @@ private void updateCategoryColorDot() {
268268
private void updateOpacityText() {
269269
opacityEditText.setText(String.format(Locale.US, "%.2f", categoryOpacity));
270270
}
271+
272+
@Override
273+
public void setSummary(CharSequence summary) {
274+
// Ignore calls to set the summary.
275+
// Summary is always the description of the category.
276+
//
277+
// This is required otherwise the ReVanced preference fragment
278+
// sets all ListPreference summaries to show the current selection.
279+
}
271280
}

0 commit comments

Comments
 (0)