mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-01-21 01:07:32 +01:00
fix(YouTube - Hide layout components): Hide new channel watermark component
This commit is contained in:
parent
f7e99832fd
commit
9670bd305b
@ -1,11 +0,0 @@
|
|||||||
package app.revanced.integrations.patches;
|
|
||||||
|
|
||||||
import app.revanced.integrations.settings.SettingsEnum;
|
|
||||||
|
|
||||||
public class BrandingWaterMarkPatch {
|
|
||||||
|
|
||||||
// Used by: app.revanced.patches.youtube.layout.watermark.patch.HideWatermarkPatch
|
|
||||||
public static boolean isBrandingWatermarkShown() {
|
|
||||||
return SettingsEnum.HIDE_VIDEO_WATERMARK.getBoolean() == false;
|
|
||||||
}
|
|
||||||
}
|
|
@ -175,11 +175,17 @@ public final class LayoutComponentsFilter extends Filter {
|
|||||||
"chips_shelf"
|
"chips_shelf"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
final var channelWatermark = new StringFilterGroup(
|
||||||
|
SettingsEnum.HIDE_VIDEO_CHANNEL_WATERMARK,
|
||||||
|
"featured_channel_watermark_overlay"
|
||||||
|
);
|
||||||
|
|
||||||
this.pathFilterGroupList.addAll(
|
this.pathFilterGroupList.addAll(
|
||||||
channelBar,
|
channelBar,
|
||||||
communityPosts,
|
communityPosts,
|
||||||
paidContent,
|
paidContent,
|
||||||
latestPosts,
|
latestPosts,
|
||||||
|
channelWatermark,
|
||||||
communityGuidelines,
|
communityGuidelines,
|
||||||
quickActions,
|
quickActions,
|
||||||
expandableMetadata,
|
expandableMetadata,
|
||||||
@ -211,6 +217,8 @@ public final class LayoutComponentsFilter extends Filter {
|
|||||||
public boolean isFiltered(@Nullable String identifier, String path, byte[] protobufBufferArray,
|
public boolean isFiltered(@Nullable String identifier, String path, byte[] protobufBufferArray,
|
||||||
FilterGroupList matchedList, FilterGroup matchedGroup, int matchedIndex) {
|
FilterGroupList matchedList, FilterGroup matchedGroup, int matchedIndex) {
|
||||||
|
|
||||||
|
// The groups are excluded from the filter due to the exceptions list below.
|
||||||
|
// Filter them separately here.
|
||||||
if (matchedGroup == notifyMe || matchedGroup == inFeedSurvey) return true;
|
if (matchedGroup == notifyMe || matchedGroup == inFeedSurvey) return true;
|
||||||
|
|
||||||
if (matchedGroup != custom && exceptions.matches(path))
|
if (matchedGroup != custom && exceptions.matches(path))
|
||||||
@ -225,7 +233,6 @@ public final class LayoutComponentsFilter extends Filter {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
*
|
|
||||||
* Called from a different place then the other filters.
|
* Called from a different place then the other filters.
|
||||||
*/
|
*/
|
||||||
public static boolean filterMixPlaylists(final byte[] bytes) {
|
public static boolean filterMixPlaylists(final byte[] bytes) {
|
||||||
@ -236,4 +243,8 @@ public final class LayoutComponentsFilter extends Filter {
|
|||||||
|
|
||||||
return isMixPlaylistFiltered;
|
return isMixPlaylistFiltered;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean showWatermark() {
|
||||||
|
return !SettingsEnum.HIDE_VIDEO_CHANNEL_WATERMARK.getBoolean();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,6 +123,7 @@ public enum SettingsEnum {
|
|||||||
HIDE_SUBSCRIPTIONS_BUTTON("revanced_hide_subscriptions_button", BOOLEAN, FALSE, true),
|
HIDE_SUBSCRIPTIONS_BUTTON("revanced_hide_subscriptions_button", BOOLEAN, FALSE, true),
|
||||||
HIDE_TIMESTAMP("revanced_hide_timestamp", BOOLEAN, FALSE),
|
HIDE_TIMESTAMP("revanced_hide_timestamp", BOOLEAN, FALSE),
|
||||||
HIDE_VIDEO_WATERMARK("revanced_hide_video_watermark", BOOLEAN, TRUE),
|
HIDE_VIDEO_WATERMARK("revanced_hide_video_watermark", BOOLEAN, TRUE),
|
||||||
|
HIDE_VIDEO_CHANNEL_WATERMARK("revanced_hide_channel_watermark", BOOLEAN, TRUE),
|
||||||
PLAYER_POPUP_PANELS("revanced_hide_player_popup_panels", BOOLEAN, FALSE),
|
PLAYER_POPUP_PANELS("revanced_hide_player_popup_panels", BOOLEAN, FALSE),
|
||||||
SWITCH_CREATE_WITH_NOTIFICATIONS_BUTTON("revanced_switch_create_with_notifications_button", BOOLEAN, TRUE, true),
|
SWITCH_CREATE_WITH_NOTIFICATIONS_BUTTON("revanced_switch_create_with_notifications_button", BOOLEAN, TRUE, true),
|
||||||
SPOOF_APP_VERSION("revanced_spoof_app_version", BOOLEAN, FALSE, true, "revanced_spoof_app_version_user_dialog_message"),
|
SPOOF_APP_VERSION("revanced_spoof_app_version", BOOLEAN, FALSE, true, "revanced_spoof_app_version_user_dialog_message"),
|
||||||
@ -374,6 +375,8 @@ public enum SettingsEnum {
|
|||||||
|
|
||||||
// region Migration
|
// region Migration
|
||||||
|
|
||||||
|
migrateOldSettingToNew(HIDE_VIDEO_WATERMARK, HIDE_VIDEO_CHANNEL_WATERMARK);
|
||||||
|
|
||||||
// Do _not_ delete this SB private user id migration property until sometime in 2024.
|
// Do _not_ delete this SB private user id migration property until sometime in 2024.
|
||||||
// This is the only setting that cannot be reconfigured if lost,
|
// This is the only setting that cannot be reconfigured if lost,
|
||||||
// and more time should be given for users who rarely upgrade.
|
// and more time should be given for users who rarely upgrade.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user