mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-02 23:54:33 +02:00
fix(YouTube - Shorts components): Do not hide Shorts action buttons on app first launch
This commit is contained in:
parent
d312833c55
commit
19bce281ef
@ -12,14 +12,14 @@ import app.revanced.extension.youtube.settings.Settings;
|
|||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public final class ShortsButtonFilter extends Filter {
|
public final class ShortsButtonFilter extends Filter {
|
||||||
private final static String REEL_CHANNEL_BAR_PATH = "reel_channel_bar.eml";
|
private static final String REEL_CHANNEL_BAR_PATH = "reel_channel_bar.eml";
|
||||||
private final static String REEL_LIVE_HEADER_PATH = "immersive_live_header.eml";
|
private static final String REEL_LIVE_HEADER_PATH = "immersive_live_header.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";
|
||||||
|
|
||||||
private final static String SHORTS_PAUSED_STATE_BUTTON_PATH = "|ScrollableContainerType|ContainerType|button.eml|";
|
private static final String SHORTS_PAUSED_STATE_BUTTON_PATH = "|ScrollableContainerType|ContainerType|button.eml|";
|
||||||
|
|
||||||
private final StringFilterGroup subscribeButton;
|
private final StringFilterGroup subscribeButton;
|
||||||
private final StringFilterGroup joinButton;
|
private final StringFilterGroup joinButton;
|
||||||
@ -30,7 +30,7 @@ public final class ShortsButtonFilter 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();
|
||||||
|
|
||||||
private final ByteArrayFilterGroup useThisSoundButton = new ByteArrayFilterGroup(
|
private final ByteArrayFilterGroup useThisSoundButton = new ByteArrayFilterGroup(
|
||||||
@ -106,9 +106,9 @@ public final class ShortsButtonFilter extends Filter {
|
|||||||
"subscribe_button"
|
"subscribe_button"
|
||||||
);
|
);
|
||||||
|
|
||||||
actionBar = new StringFilterGroup(
|
actionButton = new StringFilterGroup(
|
||||||
null,
|
null,
|
||||||
"shorts_action_bar"
|
"shorts_video_action_button.eml"
|
||||||
);
|
);
|
||||||
|
|
||||||
suggestedAction = new StringFilterGroup(
|
suggestedAction = new StringFilterGroup(
|
||||||
@ -117,7 +117,7 @@ public final class ShortsButtonFilter extends Filter {
|
|||||||
);
|
);
|
||||||
|
|
||||||
addPathCallbacks(
|
addPathCallbacks(
|
||||||
suggestedAction, actionBar, joinButton, subscribeButton, metaPanelButton,
|
suggestedAction, actionButton, joinButton, subscribeButton, metaPanelButton,
|
||||||
paidPromotionButton, pausedOverlayButtons, channelBar, fullVideoLinkLabel,
|
paidPromotionButton, pausedOverlayButtons, channelBar, fullVideoLinkLabel,
|
||||||
videoTitle, reelSoundMetadata, infoPanel, liveHeader, stickers
|
videoTitle, reelSoundMetadata, infoPanel, liveHeader, stickers
|
||||||
);
|
);
|
||||||
@ -239,7 +239,7 @@ public final class ShortsButtonFilter 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(path, identifier, allValue, protobufBufferArray, matchedGroup, contentType, contentIndex);
|
return super.isFiltered(path, identifier, allValue, protobufBufferArray, matchedGroup, contentType, contentIndex);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user