fix(YouTube - Hide layout components): Replace "Hide AI comments summary" with "Sanitize category bar"

Co-Authored-By: inotia00 <108592928+inotia00@users.noreply.github.com>
This commit is contained in:
oSumAtrIX 2026-03-11 11:19:47 +01:00
parent e7196e54b0
commit 23676746a6
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4
4 changed files with 39 additions and 26 deletions

View file

@ -15,6 +15,8 @@ import app.revanced.patches.shared.misc.settings.preference.PreferenceScreenPref
import app.revanced.patches.youtube.layout.hide.shelves.hideHorizontalShelvesPatch
import app.revanced.patches.youtube.misc.engagement.engagementPanelHookPatch
import app.revanced.patches.youtube.misc.litho.filter.lithoFilterPatch
import app.revanced.patches.youtube.misc.litho.lazily.hookTreeNodeResult
import app.revanced.patches.youtube.misc.litho.lazily.lazilyConvertedElementHookPatch
import app.revanced.patches.youtube.misc.navigation.navigationBarHookPatch
import app.revanced.patches.youtube.misc.playservice.is_20_21_or_greater
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
@ -86,6 +88,7 @@ val hideLayoutComponentsPatch = hideLayoutComponentsPatch(
engagementPanelHookPatch,
resourceMappingPatch,
hideHorizontalShelvesPatch,
lazilyConvertedElementHookPatch
),
filterClasses = setOf(
LAYOUT_COMPONENTS_FILTER_CLASS_DESCRIPTOR,
@ -154,7 +157,8 @@ val hideLayoutComponentsPatch = hideLayoutComponentsPatch(
SwitchPreference("revanced_hide_comments_emoji_and_timestamp_buttons"),
SwitchPreference("revanced_hide_comments_preview_comment"),
SwitchPreference("revanced_hide_comments_thanks_button"),
),
SwitchPreference("revanced_sanitize_comments_category_bar"),
),
sorting = Sorting.UNSORTED,
),
SwitchPreference("revanced_hide_channel_bar"),
@ -272,6 +276,8 @@ val hideLayoutComponentsPatch = hideLayoutComponentsPatch(
)
}
hookTreeNodeResult("$COMMENTS_FILTER_CLASS_NAME->sanitizeCommentsCategoryBar")
// region Hide mix playlists
parseElementFromBufferMethodMatch.let {

View file

@ -493,9 +493,6 @@ However, enabling this will also log some user data such as your IP address."</s
<string name="revanced_hide_comments_ai_chat_summary_title">Hide AI chat summary</string>
<string name="revanced_hide_comments_ai_chat_summary_summary_on">AI chat summary is hidden</string>
<string name="revanced_hide_comments_ai_chat_summary_summary_off">AI chat summary is shown</string>
<string name="revanced_hide_comments_ai_summary_title">Hide AI comments summary</string>
<string name="revanced_hide_comments_ai_summary_summary_on">AI comments summary is hidden</string>
<string name="revanced_hide_comments_ai_summary_summary_off">AI comments summary is shown</string>
<string name="revanced_hide_comments_channel_guidelines_title">Hide channel guidelines</string>
<string name="revanced_hide_comments_channel_guidelines_summary_on">Channel guidelines are hidden</string>
<string name="revanced_hide_comments_channel_guidelines_summary_off">Channel guidelines are shown</string>
@ -520,6 +517,9 @@ However, enabling this will also log some user data such as your IP address."</s
<string name="revanced_hide_comments_thanks_button_title">Hide Thanks button</string>
<string name="revanced_hide_comments_thanks_button_summary_on">Thanks button is hidden</string>
<string name="revanced_hide_comments_thanks_button_summary_off">Thanks button is shown</string>
<string name="revanced_sanitize_comments_category_bar_title">Sanitize category bar</string>
<string name="revanced_sanitize_comments_category_bar_summary_on">Category buttons except \'Top\' and \'Newest\' are hidden in the comment category bar</string>
<string name="revanced_sanitize_comments_category_bar_summary_off">Category buttons are shown in the comment category bar</string>
<string name="revanced_hide_view_count_title">Hide view count</string>
<string name="revanced_hide_view_count_summary_on">View count is hidden in feed and search results</string>
<string name="revanced_hide_view_count_summary_off">View count is shown in feed and search results</string>