mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-30 22:21:02 +00:00
feat(YouTube - Hide layout components): Add Hide in history option to filter bar (#5271)
This commit is contained in:
committed by
GitHub
parent
ca694c78d2
commit
da20e565cd
@@ -39,6 +39,7 @@ public final class LayoutComponentsFilter extends Filter {
|
||||
private final ByteArrayFilterGroup joinMembershipButton;
|
||||
private final StringFilterGroup horizontalShelves;
|
||||
private final ByteArrayFilterGroup ticketShelf;
|
||||
private final StringFilterGroup chipBar;
|
||||
|
||||
public LayoutComponentsFilter() {
|
||||
exceptions.addPatterns(
|
||||
@@ -105,6 +106,11 @@ public final class LayoutComponentsFilter extends Filter {
|
||||
"subscriptions_chip_bar"
|
||||
);
|
||||
|
||||
chipBar = new StringFilterGroup(
|
||||
Settings.HIDE_FILTER_BAR_FEED_IN_HISTORY,
|
||||
"chip_bar"
|
||||
);
|
||||
|
||||
inFeedSurvey = new StringFilterGroup(
|
||||
Settings.HIDE_FEED_SURVEY,
|
||||
"in_feed_survey",
|
||||
@@ -272,6 +278,7 @@ public final class LayoutComponentsFilter extends Filter {
|
||||
emergencyBox,
|
||||
subscribersCommunityGuidelines,
|
||||
subscriptionsChipBar,
|
||||
chipBar,
|
||||
channelGuidelines,
|
||||
audioTrackButton,
|
||||
artistCard,
|
||||
@@ -314,6 +321,10 @@ public final class LayoutComponentsFilter extends Filter {
|
||||
return contentIndex == 0 && (hideShelves() || ticketShelf.check(protobufBufferArray).isFiltered());
|
||||
}
|
||||
|
||||
if (matchedGroup == chipBar) {
|
||||
return contentIndex == 0 && NavigationButton.getSelectedNavigationButton() == NavigationButton.LIBRARY;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -448,7 +459,7 @@ public final class LayoutComponentsFilter extends Filter {
|
||||
}
|
||||
|
||||
// Do not hide if the navigation back button is visible,
|
||||
// otherwise the content shelves in the explore/music/courses pages are hidde.
|
||||
// otherwise the content shelves in the explore/music/courses pages are hidden.
|
||||
if (NavigationBar.isBackButtonVisible()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -98,6 +98,7 @@ public class Settings extends BaseSettings {
|
||||
public static final BooleanSetting HIDE_EXPANDABLE_CHIP = new BooleanSetting("revanced_hide_expandable_chip", 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);
|
||||
public static final BooleanSetting HIDE_FILTER_BAR_FEED_IN_SEARCH = new BooleanSetting("revanced_hide_filter_bar_feed_in_search", FALSE, true);
|
||||
public static final BooleanSetting HIDE_FLOATING_MICROPHONE_BUTTON = new BooleanSetting("revanced_hide_floating_microphone_button", TRUE, true);
|
||||
|
||||
Reference in New Issue
Block a user