mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-12-03 17:22:54 +01:00
fix(YouTube - Hide shorts components): Hide the subscribe button when paused
This commit is contained in:
parent
1efd5c8315
commit
6730aaf2b8
@ -16,6 +16,7 @@ public final class ShortsFilter extends Filter {
|
|||||||
private final String REEL_CHANNEL_BAR_PATH = "reel_channel_bar.eml";
|
private final String REEL_CHANNEL_BAR_PATH = "reel_channel_bar.eml";
|
||||||
|
|
||||||
private final StringFilterGroup channelBar;
|
private final StringFilterGroup channelBar;
|
||||||
|
private final StringFilterGroup subscribeButton;
|
||||||
private final StringFilterGroup soundButton;
|
private final StringFilterGroup soundButton;
|
||||||
private final StringFilterGroup infoPanel;
|
private final StringFilterGroup infoPanel;
|
||||||
private final StringFilterGroup shelfHeader;
|
private final StringFilterGroup shelfHeader;
|
||||||
@ -53,7 +54,8 @@ public final class ShortsFilter extends Filter {
|
|||||||
SettingsEnum.HIDE_SHORTS_JOIN_BUTTON,
|
SettingsEnum.HIDE_SHORTS_JOIN_BUTTON,
|
||||||
"sponsor_button"
|
"sponsor_button"
|
||||||
);
|
);
|
||||||
var subscribeButton = new StringFilterGroup(
|
|
||||||
|
subscribeButton = new StringFilterGroup(
|
||||||
SettingsEnum.HIDE_SHORTS_SUBSCRIBE_BUTTON,
|
SettingsEnum.HIDE_SHORTS_SUBSCRIBE_BUTTON,
|
||||||
"subscribe_button",
|
"subscribe_button",
|
||||||
"shorts_paused_state"
|
"shorts_paused_state"
|
||||||
@ -63,6 +65,7 @@ public final class ShortsFilter extends Filter {
|
|||||||
SettingsEnum.HIDE_SHORTS_CHANNEL_BAR,
|
SettingsEnum.HIDE_SHORTS_CHANNEL_BAR,
|
||||||
REEL_CHANNEL_BAR_PATH
|
REEL_CHANNEL_BAR_PATH
|
||||||
);
|
);
|
||||||
|
|
||||||
soundButton = new StringFilterGroup(
|
soundButton = new StringFilterGroup(
|
||||||
SettingsEnum.HIDE_SHORTS_SOUND_BUTTON,
|
SettingsEnum.HIDE_SHORTS_SOUND_BUTTON,
|
||||||
"reel_pivot_button"
|
"reel_pivot_button"
|
||||||
@ -105,8 +108,11 @@ public final class ShortsFilter extends Filter {
|
|||||||
FilterGroupList matchedList, FilterGroup matchedGroup, int matchedIndex) {
|
FilterGroupList matchedList, FilterGroup matchedGroup, int matchedIndex) {
|
||||||
if (matchedList == pathFilterGroupList) {
|
if (matchedList == pathFilterGroupList) {
|
||||||
// Always filter if matched.
|
// Always filter if matched.
|
||||||
if (matchedGroup == soundButton || matchedGroup == infoPanel || matchedGroup == channelBar)
|
if (matchedGroup == soundButton ||
|
||||||
return super.isFiltered(identifier, path, protobufBufferArray, matchedList, matchedGroup, matchedIndex);
|
matchedGroup == infoPanel ||
|
||||||
|
matchedGroup == channelBar ||
|
||||||
|
matchedGroup == subscribeButton
|
||||||
|
) return super.isFiltered(identifier, path, protobufBufferArray, matchedList, matchedGroup, matchedIndex);
|
||||||
|
|
||||||
// Video action buttons (comment, share, remix) have the same path.
|
// Video action buttons (comment, share, remix) have the same path.
|
||||||
if (matchedGroup == videoActionButton) {
|
if (matchedGroup == videoActionButton) {
|
||||||
|
Loading…
Reference in New Issue
Block a user