Skip to content

Commit

Permalink
fix(YouTube - Shorts components): Do not hide Shorts action buttons o…
Browse files Browse the repository at this point in the history
…n app first launch
  • Loading branch information
inotia00 authored and anddea committed Dec 11, 2024
1 parent ad0d15e commit f5cd017
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ public final class ShortsButtonFilter extends Filter {
/**
* 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 joinButton;
Expand All @@ -38,7 +38,7 @@ public final class ShortsButtonFilter extends Filter {
private final StringFilterGroup suggestedAction;
private final ByteArrayFilterGroupList suggestedActionsGroupList = new ByteArrayFilterGroupList();

private final StringFilterGroup actionBar;
private final StringFilterGroup actionButton;
private final ByteArrayFilterGroupList videoActionButtonGroupList = new ByteArrayFilterGroupList();

private final ByteArrayFilterGroup useThisSoundButton = new ByteArrayFilterGroup(
Expand Down Expand Up @@ -114,9 +114,9 @@ public ShortsButtonFilter() {
"subscribe_button"
);

actionBar = new StringFilterGroup(
actionButton = new StringFilterGroup(
null,
"shorts_action_bar"
"shorts_video_action_button.eml"
);

suggestedAction = new StringFilterGroup(
Expand All @@ -125,7 +125,7 @@ public ShortsButtonFilter() {
);

addPathCallbacks(
suggestedAction, actionBar, joinButton, subscribeButton, metaPanelButton,
suggestedAction, actionButton, joinButton, subscribeButton, metaPanelButton,
paidPromotionButton, pausedOverlayButtons, channelBar, fullVideoLinkLabel,
videoTitle, reelSoundMetadata, infoPanel, liveHeader, stickers
);
Expand Down Expand Up @@ -253,7 +253,7 @@ public boolean isFiltered(String path, @Nullable String identifier, String allVa
}

// Video action buttons (like, dislike, comment, share, remix) have the same path.
if (matchedGroup == actionBar) {
if (matchedGroup == actionButton) {
// If the Comment button is hidden, there is no need to check {@code REEL_COMMENTS_DISABLED_PATTERN}.
// Check {@code videoActionButtonGroupList} first.
if (videoActionButtonGroupList.check(protobufBufferArray).isFiltered()) {
Expand Down

0 comments on commit f5cd017

Please sign in to comment.