From 1479d6bc2668758ea55f9d640684547f710099f0 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sun, 8 Oct 2023 21:08:29 +0200 Subject: [PATCH 1/2] fix(YouTube - Hide shorts components): Do not hide subscribe button outside of Shorts --- .../patches/components/ShortsFilter.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/app/revanced/integrations/patches/components/ShortsFilter.java b/app/src/main/java/app/revanced/integrations/patches/components/ShortsFilter.java index a5602476f3..7ab5a54296 100644 --- a/app/src/main/java/app/revanced/integrations/patches/components/ShortsFilter.java +++ b/app/src/main/java/app/revanced/integrations/patches/components/ShortsFilter.java @@ -10,6 +10,7 @@ import static app.revanced.integrations.utils.ReVancedUtils.hideViewBy1dpUnderCondition; import static app.revanced.integrations.utils.ReVancedUtils.hideViewUnderCondition; +/** @noinspection unused*/ @RequiresApi(api = Build.VERSION_CODES.N) public final class ShortsFilter extends Filter { public static PivotBar pivotBar; // Set by patch. @@ -117,21 +118,25 @@ boolean isFiltered(@Nullable String identifier, String path, byte[] protobufBuff if (matchedGroup == soundButton || matchedGroup == infoPanel || matchedGroup == channelBar || - matchedGroup == subscribeButton || matchedGroup == subscribeButtonPaused ) return super.isFiltered(identifier, path, protobufBufferArray, matchedList, matchedGroup, matchedIndex); // Video action buttons (comment, share, remix) have the same path. if (matchedGroup == videoActionButton) { - if (videoActionButtonGroupList.check(protobufBufferArray).isFiltered()) - return super.isFiltered(identifier, path, protobufBufferArray, matchedList, matchedGroup, matchedIndex); + if (videoActionButtonGroupList.check(protobufBufferArray).isFiltered()) return super.isFiltered( + identifier, path, protobufBufferArray, matchedList, matchedGroup, matchedIndex + ); return false; } // Filter other path groups from pathFilterGroupList, only when reelChannelBar is visible // to avoid false positives. - if (!path.startsWith(REEL_CHANNEL_BAR_PATH)) - return false; + if (path.startsWith(REEL_CHANNEL_BAR_PATH)) + if (matchedGroup == subscribeButton) return super.isFiltered( + identifier, path, protobufBufferArray, matchedList, matchedGroup, matchedIndex + ); + + return false; } else if (matchedGroup == shelfHeader) { // Because the header is used in watch history and possibly other places, check for the index, // which is 0 when the shelf header is used for Shorts. From 8a40ca616e9ca02861a8b52cfafa09088ee601e5 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sun, 8 Oct 2023 19:13:01 +0000 Subject: [PATCH 2/2] chore(release): 0.119.1-dev.1 [skip ci] ## [0.119.1-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v0.119.0...v0.119.1-dev.1) (2023-10-08) ### Bug Fixes * **YouTube - Hide shorts components:** Do not hide subscribe button outside of Shorts ([1479d6b](https://github.com/ReVanced/revanced-integrations/commit/1479d6bc2668758ea55f9d640684547f710099f0)) --- CHANGELOG.md | 7 +++++++ gradle.properties | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24aa6f245e..07439ffead 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [0.119.1-dev.1](https://github.com/ReVanced/revanced-integrations/compare/v0.119.0...v0.119.1-dev.1) (2023-10-08) + + +### Bug Fixes + +* **YouTube - Hide shorts components:** Do not hide subscribe button outside of Shorts ([1479d6b](https://github.com/ReVanced/revanced-integrations/commit/1479d6bc2668758ea55f9d640684547f710099f0)) + # [0.119.0](https://github.com/ReVanced/revanced-integrations/compare/v0.118.0...v0.119.0) (2023-10-08) diff --git a/gradle.properties b/gradle.properties index 362609c067..707ccfa03d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ org.gradle.parallel = true org.gradle.caching = true android.useAndroidX = true -version = 0.119.0 +version = 0.119.1-dev.1