|
43 | 43 | import app.revanced.integrations.shared.utils.Utils;
|
44 | 44 | import app.revanced.integrations.youtube.settings.Settings;
|
45 | 45 |
|
46 |
| -/** |
47 |
| - * @noinspection deprecation |
48 |
| - */ |
| 46 | +@SuppressWarnings({"deprecation", "StaticFieldLeak"}) |
49 | 47 | public enum SegmentCategory {
|
50 |
| - SPONSOR("sponsor", sf("revanced_sb_segments_sponsor"), sf("revanced_sb_segments_sponsor_sum"), sf("revanced_sb_skip_button_sponsor"), sf("revanced_sb_skipped_sponsor"), |
| 48 | + SPONSOR("sponsor", sf("revanced_sb_segments_sponsor"), sf("revanced_sb_skip_button_sponsor"), sf("revanced_sb_skipped_sponsor"), |
51 | 49 | SB_CATEGORY_SPONSOR, SB_CATEGORY_SPONSOR_COLOR),
|
52 |
| - SELF_PROMO("selfpromo", sf("revanced_sb_segments_selfpromo"), sf("revanced_sb_segments_selfpromo_sum"), sf("revanced_sb_skip_button_selfpromo"), sf("revanced_sb_skipped_selfpromo"), |
| 50 | + SELF_PROMO("selfpromo", sf("revanced_sb_segments_selfpromo"), sf("revanced_sb_skip_button_selfpromo"), sf("revanced_sb_skipped_selfpromo"), |
53 | 51 | SB_CATEGORY_SELF_PROMO, SB_CATEGORY_SELF_PROMO_COLOR),
|
54 |
| - INTERACTION("interaction", sf("revanced_sb_segments_interaction"), sf("revanced_sb_segments_interaction_sum"), sf("revanced_sb_skip_button_interaction"), sf("revanced_sb_skipped_interaction"), |
| 52 | + INTERACTION("interaction", sf("revanced_sb_segments_interaction"), sf("revanced_sb_skip_button_interaction"), sf("revanced_sb_skipped_interaction"), |
55 | 53 | SB_CATEGORY_INTERACTION, SB_CATEGORY_INTERACTION_COLOR),
|
56 | 54 | /**
|
57 | 55 | * Unique category that is treated differently than the rest.
|
58 | 56 | */
|
59 |
| - HIGHLIGHT("poi_highlight", sf("revanced_sb_segments_highlight"), sf("revanced_sb_segments_highlight_sum"), sf("revanced_sb_skip_button_highlight"), sf("revanced_sb_skipped_highlight"), |
| 57 | + HIGHLIGHT("poi_highlight", sf("revanced_sb_segments_highlight"), sf("revanced_sb_skip_button_highlight"), sf("revanced_sb_skipped_highlight"), |
60 | 58 | SB_CATEGORY_HIGHLIGHT, SB_CATEGORY_HIGHLIGHT_COLOR),
|
61 |
| - INTRO("intro", sf("revanced_sb_segments_intro"), sf("revanced_sb_segments_intro_sum"), |
| 59 | + INTRO("intro", sf("revanced_sb_segments_intro"), |
62 | 60 | sf("revanced_sb_skip_button_intro_beginning"), sf("revanced_sb_skip_button_intro_middle"), sf("revanced_sb_skip_button_intro_end"),
|
63 | 61 | sf("revanced_sb_skipped_intro_beginning"), sf("revanced_sb_skipped_intro_middle"), sf("revanced_sb_skipped_intro_end"),
|
64 | 62 | SB_CATEGORY_INTRO, SB_CATEGORY_INTRO_COLOR),
|
65 |
| - OUTRO("outro", sf("revanced_sb_segments_outro"), sf("revanced_sb_segments_outro_sum"), sf("revanced_sb_skip_button_outro"), sf("revanced_sb_skipped_outro"), |
| 63 | + OUTRO("outro", sf("revanced_sb_segments_outro"), sf("revanced_sb_skip_button_outro"), sf("revanced_sb_skipped_outro"), |
66 | 64 | SB_CATEGORY_OUTRO, SB_CATEGORY_OUTRO_COLOR),
|
67 |
| - PREVIEW("preview", sf("revanced_sb_segments_preview"), sf("revanced_sb_segments_preview_sum"), |
| 65 | + PREVIEW("preview", sf("revanced_sb_segments_preview"), |
68 | 66 | sf("revanced_sb_skip_button_preview_beginning"), sf("revanced_sb_skip_button_preview_middle"), sf("revanced_sb_skip_button_preview_end"),
|
69 | 67 | sf("revanced_sb_skipped_preview_beginning"), sf("revanced_sb_skipped_preview_middle"), sf("revanced_sb_skipped_preview_end"),
|
70 | 68 | SB_CATEGORY_PREVIEW, SB_CATEGORY_PREVIEW_COLOR),
|
71 |
| - FILLER("filler", sf("revanced_sb_segments_filler"), sf("revanced_sb_segments_filler_sum"), sf("revanced_sb_skip_button_filler"), sf("revanced_sb_skipped_filler"), |
| 69 | + FILLER("filler", sf("revanced_sb_segments_filler"), sf("revanced_sb_skip_button_filler"), sf("revanced_sb_skipped_filler"), |
72 | 70 | SB_CATEGORY_FILLER, SB_CATEGORY_FILLER_COLOR),
|
73 |
| - MUSIC_OFFTOPIC("music_offtopic", sf("revanced_sb_segments_nomusic"), sf("revanced_sb_segments_nomusic_sum"), sf("revanced_sb_skip_button_nomusic"), sf("revanced_sb_skipped_nomusic"), |
| 71 | + MUSIC_OFFTOPIC("music_offtopic", sf("revanced_sb_segments_nomusic"), sf("revanced_sb_skip_button_nomusic"), sf("revanced_sb_skipped_nomusic"), |
74 | 72 | SB_CATEGORY_MUSIC_OFFTOPIC, SB_CATEGORY_MUSIC_OFFTOPIC_COLOR),
|
75 |
| - UNSUBMITTED("unsubmitted", StringRef.empty, StringRef.empty, sf("revanced_sb_skip_button_unsubmitted"), sf("revanced_sb_skipped_unsubmitted"), |
| 73 | + UNSUBMITTED("unsubmitted", StringRef.empty, sf("revanced_sb_skip_button_unsubmitted"), sf("revanced_sb_skipped_unsubmitted"), |
76 | 74 | SB_CATEGORY_UNSUBMITTED, SB_CATEGORY_UNSUBMITTED_COLOR),
|
77 | 75 | ;
|
78 | 76 |
|
@@ -159,14 +157,12 @@ public static void loadAllCategoriesFromSettings() {
|
159 | 157 | @NonNull
|
160 | 158 | public final String keyValue;
|
161 | 159 | @NonNull
|
162 |
| - private final StringSetting behaviorSetting; |
| 160 | + public final StringSetting behaviorSetting; |
163 | 161 | @NonNull
|
164 | 162 | private final StringSetting colorSetting;
|
165 | 163 |
|
166 | 164 | @NonNull
|
167 | 165 | public final StringRef title;
|
168 |
| - @NonNull |
169 |
| - public final StringRef description; |
170 | 166 |
|
171 | 167 | /**
|
172 | 168 | * Skip button text, if the skip occurs in the first quarter of the video
|
@@ -214,23 +210,22 @@ public static void loadAllCategoriesFromSettings() {
|
214 | 210 | @NonNull
|
215 | 211 | public CategoryBehaviour behaviour = CategoryBehaviour.IGNORE;
|
216 | 212 |
|
217 |
| - SegmentCategory(String keyValue, StringRef title, StringRef description, |
| 213 | + SegmentCategory(String keyValue, StringRef title, |
218 | 214 | StringRef skipButtonText,
|
219 | 215 | StringRef skippedToastText,
|
220 | 216 | StringSetting behavior, StringSetting color) {
|
221 |
| - this(keyValue, title, description, |
| 217 | + this(keyValue, title, |
222 | 218 | skipButtonText, skipButtonText, skipButtonText,
|
223 | 219 | skippedToastText, skippedToastText, skippedToastText,
|
224 | 220 | behavior, color);
|
225 | 221 | }
|
226 | 222 |
|
227 |
| - SegmentCategory(String keyValue, StringRef title, StringRef description, |
| 223 | + SegmentCategory(String keyValue, StringRef title, |
228 | 224 | StringRef skipButtonTextBeginning, StringRef skipButtonTextMiddle, StringRef skipButtonTextEnd,
|
229 | 225 | StringRef skippedToastBeginning, StringRef skippedToastMiddle, StringRef skippedToastEnd,
|
230 | 226 | StringSetting behavior, StringSetting color) {
|
231 | 227 | this.keyValue = Objects.requireNonNull(keyValue);
|
232 | 228 | this.title = Objects.requireNonNull(title);
|
233 |
| - this.description = Objects.requireNonNull(description); |
234 | 229 | this.skipButtonTextBeginning = Objects.requireNonNull(skipButtonTextBeginning);
|
235 | 230 | this.skipButtonTextMiddle = Objects.requireNonNull(skipButtonTextMiddle);
|
236 | 231 | this.skipButtonTextEnd = Objects.requireNonNull(skipButtonTextEnd);
|
|
0 commit comments