refactor(YouTube): Sort and standardize strings (#5442)

This commit is contained in:
ILoveOpenSourceApplications
2025-07-14 16:31:10 +05:30
committed by GitHub
parent e7b4ab53cf
commit d0d2c13d16
5 changed files with 53 additions and 54 deletions

View File

@@ -32,7 +32,7 @@ public final class LayoutComponentsFilter extends Filter {
);
private final StringTrieSearch exceptions = new StringTrieSearch();
private final StringFilterGroup inFeedSurvey;
private final StringFilterGroup surveys;
private final StringFilterGroup notifyMe;
private final StringFilterGroup singleItemInformationPanel;
private final StringFilterGroup expandableMetadata;
@@ -110,8 +110,8 @@ public final class LayoutComponentsFilter extends Filter {
"chip_bar"
);
inFeedSurvey = new StringFilterGroup(
Settings.HIDE_FEED_SURVEY,
surveys = new StringFilterGroup(
Settings.HIDE_SURVEYS,
"in_feed_survey",
"slimline_survey",
"feed_nudge"
@@ -286,7 +286,6 @@ public final class LayoutComponentsFilter extends Filter {
forYouShelf,
horizontalShelves,
imageShelf,
inFeedSurvey,
infoPanel,
latestPosts,
medicalPanel,
@@ -298,6 +297,7 @@ public final class LayoutComponentsFilter extends Filter {
singleItemInformationPanel,
subscribersCommunityGuidelines,
subscriptionsChipBar,
surveys,
timedReactions,
videoRecommendationLabels
);
@@ -317,7 +317,7 @@ public final class LayoutComponentsFilter extends Filter {
// The groups are excluded from the filter due to the exceptions list below.
// Filter them separately here.
if (matchedGroup == notifyMe || matchedGroup == inFeedSurvey || matchedGroup == expandableMetadata) {
if (matchedGroup == notifyMe || matchedGroup == surveys || matchedGroup == expandableMetadata) {
return true;
}

View File

@@ -100,7 +100,6 @@ public class Settings extends BaseSettings {
public static final BooleanSetting HIDE_CROWDFUNDING_BOX = new BooleanSetting("revanced_hide_crowdfunding_box", FALSE, true);
public static final BooleanSetting HIDE_DOODLES = new BooleanSetting("revanced_hide_doodles", FALSE, true, "revanced_hide_doodles_user_dialog_message");
public static final BooleanSetting HIDE_EXPANDABLE_CARD = new BooleanSetting("revanced_hide_expandable_card", TRUE);
public static final BooleanSetting HIDE_FEED_SURVEY = new BooleanSetting("revanced_hide_feed_survey", TRUE);
public static final BooleanSetting HIDE_FILTER_BAR_FEED_IN_FEED = new BooleanSetting("revanced_hide_filter_bar_feed_in_feed", FALSE, true);
public static final BooleanSetting HIDE_FILTER_BAR_FEED_IN_HISTORY = new BooleanSetting("revanced_hide_filter_bar_feed_in_history", FALSE);
public static final BooleanSetting HIDE_FILTER_BAR_FEED_IN_RELATED_VIDEOS = new BooleanSetting("revanced_hide_filter_bar_feed_in_related_videos", FALSE, true);
@@ -113,6 +112,7 @@ public class Settings extends BaseSettings {
public static final BooleanSetting HIDE_NOTIFY_ME_BUTTON = new BooleanSetting("revanced_hide_notify_me_button", TRUE);
public static final BooleanSetting HIDE_PLAYABLES = new BooleanSetting("revanced_hide_playables", TRUE);
public static final BooleanSetting HIDE_SHOW_MORE_BUTTON = new BooleanSetting("revanced_hide_show_more_button", TRUE, true);
public static final BooleanSetting HIDE_SURVEYS = new BooleanSetting("revanced_hide_surveys", TRUE);
public static final BooleanSetting HIDE_TICKET_SHELF = new BooleanSetting("revanced_hide_ticket_shelf", FALSE);
public static final BooleanSetting HIDE_VIDEO_RECOMMENDATION_LABELS = new BooleanSetting("revanced_hide_video_recommendation_labels", TRUE);