mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-05-11 11:44:24 +02:00
feat(youtube/hide-shorts-components): hide shorts info panel (#415)
This commit is contained in:
parent
592e7ed85b
commit
f5df20134c
@ -20,6 +20,11 @@ public final class ShortsFilter extends Filter {
|
|||||||
"reel_channel_bar"
|
"reel_channel_bar"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
private final StringFilterGroup infoPanel = new StringFilterGroup(
|
||||||
|
SettingsEnum.HIDE_SHORTS_INFO_PANEL,
|
||||||
|
"shorts_info_panel_overview"
|
||||||
|
);
|
||||||
|
|
||||||
public ShortsFilter() {
|
public ShortsFilter() {
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) return;
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) return;
|
||||||
|
|
||||||
@ -55,6 +60,9 @@ public final class ShortsFilter extends Filter {
|
|||||||
if (reelChannelBar.check(path).isFiltered())
|
if (reelChannelBar.check(path).isFiltered())
|
||||||
if (this.pathFilterGroups.contains(path)) return true;
|
if (this.pathFilterGroups.contains(path)) return true;
|
||||||
|
|
||||||
|
// Shorts info panel path appears outside of reelChannelBar path.
|
||||||
|
if (infoPanel.isEnabled() && infoPanel.check(path).isFiltered()) return true;
|
||||||
|
|
||||||
return this.identifierFilterGroups.contains(identifier);
|
return this.identifierFilterGroups.contains(identifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,12 +132,13 @@ public enum SettingsEnum {
|
|||||||
HIDE_FILTER_BAR_FEED_IN_FEED("revanced_hide_filter_bar_feed_in_feed", BOOLEAN, FALSE, true),
|
HIDE_FILTER_BAR_FEED_IN_FEED("revanced_hide_filter_bar_feed_in_feed", BOOLEAN, FALSE, true),
|
||||||
HIDE_FILTER_BAR_FEED_IN_SEARCH("revanced_hide_filter_bar_feed_in_search", BOOLEAN, FALSE, true),
|
HIDE_FILTER_BAR_FEED_IN_SEARCH("revanced_hide_filter_bar_feed_in_search", BOOLEAN, FALSE, true),
|
||||||
HIDE_FILTER_BAR_FEED_IN_RELATED_VIDEOS("revanced_hide_filter_bar_feed_in_related_videos", BOOLEAN, FALSE, true),
|
HIDE_FILTER_BAR_FEED_IN_RELATED_VIDEOS("revanced_hide_filter_bar_feed_in_related_videos", BOOLEAN, FALSE, true),
|
||||||
HIDE_SHORTS_JOIN_BUTTON("revanced_hide_shorts_join_button", BOOLEAN, FALSE),
|
HIDE_SHORTS_JOIN_BUTTON("revanced_hide_shorts_join_button", BOOLEAN, TRUE),
|
||||||
HIDE_SHORTS_SUBSCRIBE_BUTTON("revanced_hide_shorts_subscribe_button", BOOLEAN, FALSE),
|
HIDE_SHORTS_SUBSCRIBE_BUTTON("revanced_hide_shorts_subscribe_button", BOOLEAN, FALSE),
|
||||||
HIDE_SHORTS_THANKS_BUTTON("revanced_hide_shorts_thanks_button", BOOLEAN, FALSE),
|
HIDE_SHORTS_THANKS_BUTTON("revanced_hide_shorts_thanks_button", BOOLEAN, TRUE),
|
||||||
HIDE_SHORTS_COMMENTS_BUTTON("revanced_hide_shorts_comments_button", BOOLEAN, FALSE),
|
HIDE_SHORTS_COMMENTS_BUTTON("revanced_hide_shorts_comments_button", BOOLEAN, FALSE),
|
||||||
HIDE_SHORTS_REMIX_BUTTON("revanced_hide_shorts_remix_button", BOOLEAN, FALSE),
|
HIDE_SHORTS_REMIX_BUTTON("revanced_hide_shorts_remix_button", BOOLEAN, TRUE),
|
||||||
HIDE_SHORTS_SHARE_BUTTON("revanced_hide_shorts_share_button", BOOLEAN, FALSE),
|
HIDE_SHORTS_SHARE_BUTTON("revanced_hide_shorts_share_button", BOOLEAN, FALSE),
|
||||||
|
HIDE_SHORTS_INFO_PANEL("revanced_hide_shorts_info_panel", BOOLEAN, TRUE),
|
||||||
HIDE_SHORTS_NAVIGATION_BAR("revanced_hide_shorts_navigation_bar", BOOLEAN, TRUE, true),
|
HIDE_SHORTS_NAVIGATION_BAR("revanced_hide_shorts_navigation_bar", BOOLEAN, TRUE, true),
|
||||||
HIDE_SHORTS("revanced_hide_shorts", BOOLEAN, FALSE, true),
|
HIDE_SHORTS("revanced_hide_shorts", BOOLEAN, FALSE, true),
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user