Skip to content
This repository was archived by the owner on Oct 26, 2024. It is now read-only.

Commit 97efc17

Browse files
OxrxLoSumAtrIX
andauthored
feat: comment patch (#185)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
1 parent 8fdde70 commit 97efc17

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

app/src/main/java/app/revanced/integrations/patches/LithoFilterPatch.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ class GeneralBytecodeAdsPatch extends Filter {
193193
private final BlockRule identifierBlock;
194194

195195
public GeneralBytecodeAdsPatch() {
196-
var comments = new BlockRule(SettingsEnum.ADREMOVER_COMMENTS_REMOVAL, "comments_");
197196
var communityPosts = new BlockRule(SettingsEnum.ADREMOVER_COMMUNITY_POSTS_REMOVAL, "post_base_wrapper");
198197
var communityGuidelines = new BlockRule(SettingsEnum.ADREMOVER_COMMUNITY_GUIDELINES_REMOVAL, "community_guidelines");
199198
var compactBanner = new BlockRule(SettingsEnum.ADREMOVER_COMPACT_BANNER_REMOVAL, "compact_banner");
@@ -206,6 +205,13 @@ public GeneralBytecodeAdsPatch() {
206205
var suggestions = new BlockRule(SettingsEnum.ADREMOVER_SUGGESTIONS_REMOVAL, "horizontal_video_shelf");
207206
var latestPosts = new BlockRule(SettingsEnum.ADREMOVER_HIDE_LATEST_POSTS, "post_shelf");
208207
var channelGuidelines = new BlockRule(SettingsEnum.ADREMOVER_HIDE_CHANNEL_GUIDELINES, "channel_guidelines_entry_banner");
208+
var comments = new BlockRule(SettingsEnum.HIDE_COMMENTS_SECTION, "comments_");
209+
var previewComment = new BlockRule(
210+
SettingsEnum.HIDE_PREVIEW_COMMENT,
211+
"carousel_item",
212+
"comments_entry_point_teaser",
213+
"comments_entry_point_simplebox"
214+
);
209215
var artistCard = new BlockRule(SettingsEnum.HIDE_ARTIST_CARD, "official_card");
210216
var generalAds = new BlockRule(
211217
SettingsEnum.ADREMOVER_GENERAL_ADS_REMOVAL,
@@ -246,6 +252,7 @@ public GeneralBytecodeAdsPatch() {
246252
merchandise,
247253
infoPanel,
248254
channelGuidelines,
255+
previewComment
249256
artistCard
250257
);
251258

app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public enum SettingsEnum {
3434
ADREMOVER_MERCHANDISE_REMOVAL("revanced_adremover_merchandise", true, ReturnType.BOOLEAN, true),
3535
ADREMOVER_COMMUNITY_POSTS_REMOVAL("revanced_adremover_community_posts_removal", false, ReturnType.BOOLEAN, true),
3636
ADREMOVER_COMPACT_BANNER_REMOVAL("revanced_adremover_compact_banner_removal", true, ReturnType.BOOLEAN, true),
37-
ADREMOVER_COMMENTS_REMOVAL("revanced_adremover_comments_removal", false, ReturnType.BOOLEAN, true),
3837
ADREMOVER_MOVIE_REMOVAL("revanced_adremover_movie", true, ReturnType.BOOLEAN, true),
3938
ADREMOVER_FEED_SURVEY_REMOVAL("revanced_adremover_feed_survey", true, ReturnType.BOOLEAN, true),
4039
ADREMOVER_SHORTS_SHELF_REMOVAL("revanced_adremover_shorts_shelf", true, ReturnType.BOOLEAN, true),
@@ -73,6 +72,8 @@ public enum SettingsEnum {
7372
HIDE_CAPTIONS_BUTTON("revanced_hide_captions_button", false, ReturnType.BOOLEAN),
7473
HIDE_MIX_PLAYLISTS("revanced_mix_playlists_hidden", false, ReturnType.BOOLEAN, true),
7574
HIDE_CROWDFUNDING_BOX("revanced_hide_crowdfunding_box", false, ReturnType.BOOLEAN, true),
75+
HIDE_COMMENTS_SECTION("revanced_hide_comments_section", false, ReturnType.BOOLEAN, true),
76+
HIDE_PREVIEW_COMMENT("revanced_hide_preview_comment", false, ReturnType.BOOLEAN, true),
7677
HIDE_ALBUM_CARDS("revanced_hide_album_cards", false, ReturnType.BOOLEAN, true),
7778
HIDE_ARTIST_CARD("revanced_hide_artist_card", false, ReturnType.BOOLEAN),
7879

0 commit comments

Comments
 (0)