Skip to content

Commit

Permalink
feat(YouTube - Toolbar components): Remove Hide trending searches s…
Browse files Browse the repository at this point in the history
…etting
  • Loading branch information
anddea committed May 27, 2024
1 parent ce2fb81 commit 5d2e732
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import app.revanced.patches.youtube.general.toolbar.fingerprints.SearchBarParent
import app.revanced.patches.youtube.general.toolbar.fingerprints.SearchResultFingerprint
import app.revanced.patches.youtube.general.toolbar.fingerprints.SetActionBarRingoFingerprint
import app.revanced.patches.youtube.general.toolbar.fingerprints.SetWordMarkHeaderFingerprint
import app.revanced.patches.youtube.general.toolbar.fingerprints.TrendingSearchConfigFingerprint
import app.revanced.patches.youtube.general.toolbar.fingerprints.YouActionBarFingerprint
import app.revanced.patches.youtube.utils.castbutton.CastButtonPatch
import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE
Expand Down Expand Up @@ -79,8 +78,7 @@ object ToolBarComponentsPatch : BaseBytecodePatch(
SearchBarParentFingerprint,
SearchResultFingerprint,
SetActionBarRingoFingerprint,
SetWordMarkHeaderFingerprint,
TrendingSearchConfigFingerprint
SetWordMarkHeaderFingerprint
)
) {
private const val TARGET_RESOURCE_PATH = "res/layout/action_bar_ringo_background.xml"
Expand Down Expand Up @@ -305,15 +303,6 @@ object ToolBarComponentsPatch : BaseBytecodePatch(

// endregion

// region patch for hide trending searches

TrendingSearchConfigFingerprint.literalInstructionBooleanHook(
45399984,
"$GENERAL_CLASS_DESCRIPTOR->hideTrendingSearches(Z)Z"
)

// endregion

// region patch for hide voice search button

if (ForceHideVoiceSearchButton == true) {
Expand Down

This file was deleted.

3 changes: 0 additions & 3 deletions src/main/resources/youtube/settings/host/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -832,9 +832,6 @@ Note:
<string name="revanced_hide_transcript_section_summary_off">Transcript sections are shown.</string>
<string name="revanced_hide_transcript_section_summary_on">Transcript sections are hidden.</string>
<string name="revanced_hide_transcript_section_title">Hide transcript sections</string>
<string name="revanced_hide_trending_searches_summary_off">Trending searches are shown.</string>
<string name="revanced_hide_trending_searches_summary_on">Trending searches are hidden.</string>
<string name="revanced_hide_trending_searches_title">Hide trending searches</string>
<string name="revanced_hide_video_ads_summary_off">Video ads are shown.</string>
<string name="revanced_hide_video_ads_summary_on">Video ads are hidden.</string>
<string name="revanced_hide_video_ads_title">Hide video ads</string>
Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/youtube/settings/xml/revanced_prefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
<SwitchPreference android:title="@string/revanced_hide_toolbar_cast_button_title" android:key="revanced_hide_toolbar_cast_button" android:defaultValue="true" android:summaryOn="@string/revanced_hide_toolbar_cast_button_summary_on" android:summaryOff="@string/revanced_hide_toolbar_cast_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_toolbar_create_button_title" android:key="revanced_hide_toolbar_create_button" android:defaultValue="false" android:summaryOn="@string/revanced_hide_toolbar_create_button_summary_on" android:summaryOff="@string/revanced_hide_toolbar_create_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_toolbar_notification_button_title" android:key="revanced_hide_toolbar_notification_button" android:defaultValue="false" android:summaryOn="@string/revanced_hide_toolbar_notification_button_summary_on" android:summaryOff="@string/revanced_hide_toolbar_notification_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_search_term_thumbnail_title" android:key="revanced_hide_search_term_thumbnail" android:defaultValue="false" android:summaryOn="@string/revanced_hide_search_term_thumbnail_summary_on" android:summaryOff="@string/revanced_hide_search_term_thumbnail_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_trending_searches_title" android:key="revanced_hide_trending_searches" android:defaultValue="true" android:summaryOn="@string/revanced_hide_trending_searches_summary_on" android:summaryOff="@string/revanced_hide_trending_searches_summary_off" />SETTINGS: TOOLBAR_COMPONENTS -->
<SwitchPreference android:title="@string/revanced_hide_search_term_thumbnail_title" android:key="revanced_hide_search_term_thumbnail" android:defaultValue="false" android:summaryOn="@string/revanced_hide_search_term_thumbnail_summary_on" android:summaryOff="@string/revanced_hide_search_term_thumbnail_summary_off" />SETTINGS: TOOLBAR_COMPONENTS -->
<!-- SETTINGS: HIDE_VOICE_SEARCH_BUTTON
<SwitchPreference android:title="@string/revanced_hide_voice_search_button_title" android:key="revanced_hide_voice_search_button" android:defaultValue="false" android:summaryOn="@string/revanced_hide_voice_search_button_summary_on" android:summaryOff="@string/revanced_hide_voice_search_button_summary_off" />SETTINGS: HIDE_VOICE_SEARCH_BUTTON -->
<!-- SETTINGS: TOOLBAR_COMPONENTS
Expand Down

0 comments on commit 5d2e732

Please sign in to comment.