mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-05-01 23:24:29 +02:00
fix(YouTube - Hide Shorts components): Do not hide Shorts action buttons on app first launch (#3933)
This commit is contained in:
parent
3429286c15
commit
0d78815e33
@ -22,12 +22,12 @@ import app.revanced.extension.youtube.shared.PlayerType;
|
|||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public final class ShortsFilter extends Filter {
|
public final class ShortsFilter extends Filter {
|
||||||
private static final boolean HIDE_SHORTS_NAVIGATION_BAR = Settings.HIDE_SHORTS_NAVIGATION_BAR.get();
|
private static final boolean HIDE_SHORTS_NAVIGATION_BAR = Settings.HIDE_SHORTS_NAVIGATION_BAR.get();
|
||||||
private final static String REEL_CHANNEL_BAR_PATH = "reel_channel_bar.eml";
|
private static final String REEL_CHANNEL_BAR_PATH = "reel_channel_bar.eml";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For paid promotion label and subscribe button that appears in the channel bar.
|
* For paid promotion label and subscribe button that appears in the channel bar.
|
||||||
*/
|
*/
|
||||||
private final static String REEL_METAPANEL_PATH = "reel_metapanel.eml";
|
private static final String REEL_METAPANEL_PATH = "reel_metapanel.eml";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tags that appears when opening the Shorts player.
|
* Tags that appears when opening the Shorts player.
|
||||||
@ -52,7 +52,7 @@ public final class ShortsFilter extends Filter {
|
|||||||
private final StringFilterGroup suggestedAction;
|
private final StringFilterGroup suggestedAction;
|
||||||
private final ByteArrayFilterGroupList suggestedActionsGroupList = new ByteArrayFilterGroupList();
|
private final ByteArrayFilterGroupList suggestedActionsGroupList = new ByteArrayFilterGroupList();
|
||||||
|
|
||||||
private final StringFilterGroup actionBar;
|
private final StringFilterGroup actionButton;
|
||||||
private final ByteArrayFilterGroupList videoActionButtonGroupList = new ByteArrayFilterGroupList();
|
private final ByteArrayFilterGroupList videoActionButtonGroupList = new ByteArrayFilterGroupList();
|
||||||
|
|
||||||
public ShortsFilter() {
|
public ShortsFilter() {
|
||||||
@ -156,9 +156,9 @@ public final class ShortsFilter extends Filter {
|
|||||||
"reel_player_disclosure.eml"
|
"reel_player_disclosure.eml"
|
||||||
);
|
);
|
||||||
|
|
||||||
actionBar = new StringFilterGroup(
|
actionButton = new StringFilterGroup(
|
||||||
null,
|
null,
|
||||||
"shorts_action_bar"
|
"shorts_video_action_button.eml"
|
||||||
);
|
);
|
||||||
|
|
||||||
suggestedAction = new StringFilterGroup(
|
suggestedAction = new StringFilterGroup(
|
||||||
@ -167,7 +167,7 @@ public final class ShortsFilter extends Filter {
|
|||||||
);
|
);
|
||||||
|
|
||||||
addPathCallbacks(
|
addPathCallbacks(
|
||||||
shortsCompactFeedVideoPath, suggestedAction, actionBar, joinButton, subscribeButton,
|
shortsCompactFeedVideoPath, suggestedAction, actionButton, joinButton, subscribeButton,
|
||||||
paidPromotionButton, pausedOverlayButtons, channelBar, fullVideoLinkLabel, videoTitle,
|
paidPromotionButton, pausedOverlayButtons, channelBar, fullVideoLinkLabel, videoTitle,
|
||||||
reelSoundMetadata, soundButton, infoPanel, stickers, likeFountain
|
reelSoundMetadata, soundButton, infoPanel, stickers, likeFountain
|
||||||
);
|
);
|
||||||
@ -287,7 +287,7 @@ public final class ShortsFilter extends Filter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Video action buttons (like, dislike, comment, share, remix) have the same path.
|
// Video action buttons (like, dislike, comment, share, remix) have the same path.
|
||||||
if (matchedGroup == actionBar) {
|
if (matchedGroup == actionButton) {
|
||||||
if (videoActionButtonGroupList.check(protobufBufferArray).isFiltered()) {
|
if (videoActionButtonGroupList.check(protobufBufferArray).isFiltered()) {
|
||||||
return super.isFiltered(identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex);
|
return super.isFiltered(identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex);
|
||||||
}
|
}
|
||||||
|
@ -233,7 +233,7 @@ public class Settings extends BaseSettings {
|
|||||||
public static final BooleanSetting HIDE_SHORTS_UPCOMING_BUTTON = new BooleanSetting("revanced_hide_shorts_upcoming_button", TRUE);
|
public static final BooleanSetting HIDE_SHORTS_UPCOMING_BUTTON = new BooleanSetting("revanced_hide_shorts_upcoming_button", TRUE);
|
||||||
public static final BooleanSetting HIDE_SHORTS_GREEN_SCREEN_BUTTON = new BooleanSetting("revanced_hide_shorts_green_screen_button", TRUE);
|
public static final BooleanSetting HIDE_SHORTS_GREEN_SCREEN_BUTTON = new BooleanSetting("revanced_hide_shorts_green_screen_button", TRUE);
|
||||||
public static final BooleanSetting HIDE_SHORTS_HASHTAG_BUTTON = new BooleanSetting("revanced_hide_shorts_hashtag_button", TRUE);
|
public static final BooleanSetting HIDE_SHORTS_HASHTAG_BUTTON = new BooleanSetting("revanced_hide_shorts_hashtag_button", TRUE);
|
||||||
public static final BooleanSetting HIDE_SHORTS_SEARCH_SUGGESTIONS = new BooleanSetting("revanced_hide_shorts_search_suggestions", FALSE);
|
public static final BooleanSetting HIDE_SHORTS_SEARCH_SUGGESTIONS = new BooleanSetting("revanced_hide_shorts_search_suggestions", TRUE);
|
||||||
public static final BooleanSetting HIDE_SHORTS_STICKERS = new BooleanSetting("revanced_hide_shorts_stickers", TRUE);
|
public static final BooleanSetting HIDE_SHORTS_STICKERS = new BooleanSetting("revanced_hide_shorts_stickers", TRUE);
|
||||||
public static final BooleanSetting HIDE_SHORTS_SUPER_THANKS_BUTTON = new BooleanSetting("revanced_hide_shorts_super_thanks_button", TRUE);
|
public static final BooleanSetting HIDE_SHORTS_SUPER_THANKS_BUTTON = new BooleanSetting("revanced_hide_shorts_super_thanks_button", TRUE);
|
||||||
public static final BooleanSetting HIDE_SHORTS_LIKE_FOUNTAIN = new BooleanSetting("revanced_hide_shorts_like_fountain", TRUE);
|
public static final BooleanSetting HIDE_SHORTS_LIKE_FOUNTAIN = new BooleanSetting("revanced_hide_shorts_like_fountain", TRUE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user