diff --git a/app/src/main/java/app/revanced/integrations/youtube/patches/components/CommentsFilter.java b/app/src/main/java/app/revanced/integrations/youtube/patches/components/CommentsFilter.java index 3170498d10..49a06dd6fe 100644 --- a/app/src/main/java/app/revanced/integrations/youtube/patches/components/CommentsFilter.java +++ b/app/src/main/java/app/revanced/integrations/youtube/patches/components/CommentsFilter.java @@ -14,6 +14,12 @@ final class CommentsFilter extends Filter { private final ByteArrayFilterGroup emojiPickerBufferGroup; public CommentsFilter() { + var commentsByMembers = new StringFilterGroup( + Settings.HIDE_COMMENTS_BY_MEMBERS_HEADER, + "sponsorships_comments_header.eml", + "sponsorships_comments_footer.eml" + ); + var comments = new StringFilterGroup( Settings.HIDE_COMMENTS_SECTION, "video_metadata_carousel", @@ -21,14 +27,19 @@ public CommentsFilter() { ); var previewComment = new StringFilterGroup( - Settings.HIDE_PREVIEW_COMMENT, + Settings.HIDE_COMMENTS_PREVIEW_COMMENT, "|carousel_item", "comments_entry_point_teaser", "comments_entry_point_simplebox" ); + var thanksButton = new StringFilterGroup( + Settings.HIDE_COMMENTS_THANKS_BUTTON, + "super_thanks_button.eml" + ); + commentComposer = new StringFilterGroup( - Settings.HIDE_COMMENT_TIMESTAMP_AND_EMOJI_BUTTONS, + Settings.HIDE_COMMENTS_TIMESTAMP_AND_EMOJI_BUTTONS, "comment_composer.eml" ); @@ -38,8 +49,10 @@ public CommentsFilter() { ); addPathCallbacks( + commentsByMembers, comments, previewComment, + thanksButton, commentComposer ); } diff --git a/app/src/main/java/app/revanced/integrations/youtube/settings/Settings.java b/app/src/main/java/app/revanced/integrations/youtube/settings/Settings.java index c64b6820d0..d55d4630a0 100644 --- a/app/src/main/java/app/revanced/integrations/youtube/settings/Settings.java +++ b/app/src/main/java/app/revanced/integrations/youtube/settings/Settings.java @@ -147,9 +147,11 @@ public class Settings extends BaseSettings { "org.schabi.newpipe" /* NewPipe */, parentsAny(EXTERNAL_DOWNLOADER, EXTERNAL_DOWNLOADER_ACTION_BUTTON)); // Comments - public static final BooleanSetting HIDE_PREVIEW_COMMENT = new BooleanSetting("revanced_hide_preview_comment", FALSE); + public static final BooleanSetting HIDE_COMMENTS_BY_MEMBERS_HEADER = new BooleanSetting("revanced_hide_comments_by_members_header", FALSE); public static final BooleanSetting HIDE_COMMENTS_SECTION = new BooleanSetting("revanced_hide_comments_section", FALSE); - public static final BooleanSetting HIDE_COMMENT_TIMESTAMP_AND_EMOJI_BUTTONS = new BooleanSetting("revanced_hide_comment_timestamp_and_emoji_buttons", TRUE); + public static final BooleanSetting HIDE_COMMENTS_PREVIEW_COMMENT = new BooleanSetting("revanced_hide_comments_preview_comment", FALSE); + public static final BooleanSetting HIDE_COMMENTS_THANKS_BUTTON = new BooleanSetting("revanced_hide_comments_thanks_button", TRUE); + public static final BooleanSetting HIDE_COMMENTS_TIMESTAMP_AND_EMOJI_BUTTONS = new BooleanSetting("revanced_hide_comments_timestamp_and_emoji_buttons", TRUE); // Description public static final BooleanSetting HIDE_CHAPTERS = new BooleanSetting("revanced_hide_chapters", TRUE);