Skip to content

Commit

Permalink
feat(YouTube/Shorts Component): always hide suggested actions if all …
Browse files Browse the repository at this point in the history
…sub-settings of the suggested actions category are enabled
  • Loading branch information
inotia00 committed Sep 28, 2024
1 parent 0642d18 commit ec68f16
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 32 deletions.
55 changes: 31 additions & 24 deletions src/main/resources/youtube/settings/host/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1133,30 +1133,6 @@ Side effect: Official headers in search results will be hidden."</string>
<string name="revanced_hide_shorts_shopping_button_title">Hide Shopping button</string>
<string name="revanced_hide_shorts_shopping_button_summary_on">Shopping button is hidden.</string>
<string name="revanced_hide_shorts_shopping_button_summary_off">Shopping button is shown.</string>
<string name="revanced_hide_shorts_shop_button_title">Hide Shop button</string>
<string name="revanced_hide_shorts_shop_button_summary_on">Shop button is hidden.</string>
<string name="revanced_hide_shorts_shop_button_summary_off">Shop button is shown.</string>
<string name="revanced_hide_shorts_super_thanks_button_title">Hide Super Thanks button</string>
<string name="revanced_hide_shorts_super_thanks_button_summary_on">Super Thanks button is hidden.</string>
<string name="revanced_hide_shorts_super_thanks_button_summary_off">Super Thanks button is shown.</string>
<string name="revanced_hide_shorts_tagged_products_title">Hide tagged products</string>
<string name="revanced_hide_shorts_tagged_products_summary_on">Tagged products are hidden.</string>
<string name="revanced_hide_shorts_tagged_products_summary_off">Tagged products are shown.</string>
<string name="revanced_hide_shorts_location_button_title">Hide location button</string>
<string name="revanced_hide_shorts_location_button_summary_on">Location button is hidden.</string>
<string name="revanced_hide_shorts_location_button_summary_off">Location button is shown.</string>
<string name="revanced_hide_shorts_save_sound_button_title">Hide save sound to playlist button</string>
<string name="revanced_hide_shorts_save_sound_button_summary_on">Save sound to playlist button is hidden.</string>
<string name="revanced_hide_shorts_save_sound_button_summary_off">Save sound to playlist button is shown.</string>
<string name="revanced_hide_shorts_search_suggestions_button_title">Hide search suggestions button</string>
<string name="revanced_hide_shorts_search_suggestions_button_summary_on">Search suggestions button is hidden.</string>
<string name="revanced_hide_shorts_search_suggestions_button_summary_off">Search suggestions button is shown.</string>
<string name="revanced_hide_shorts_use_this_sound_button_title">Hide Use this sound button</string>
<string name="revanced_hide_shorts_use_this_sound_button_summary_on">Use this sound button is hidden.</string>
<string name="revanced_hide_shorts_use_this_sound_button_summary_off">Use this sound button is shown.</string>
<string name="revanced_hide_shorts_use_template_button_title">Hide Use template button</string>
<string name="revanced_hide_shorts_use_template_button_summary_on">Use template button is hidden.</string>
<string name="revanced_hide_shorts_use_template_button_summary_off">Use template button is shown.</string>
<string name="revanced_hide_shorts_info_panel_title">Hide info panels</string>
<string name="revanced_hide_shorts_info_panel_summary_on">Info panels are hidden.</string>
<string name="revanced_hide_shorts_info_panel_summary_off">Info panels are shown.</string>
Expand All @@ -1176,6 +1152,37 @@ Side effect: Official headers in search results will be hidden."</string>
<string name="revanced_hide_shorts_full_video_link_label_summary_on">Video link label is hidden.</string>
<string name="revanced_hide_shorts_full_video_link_label_summary_off">Video link label is shown.</string>

<!-- PreferenceScreen: Shorts, PreferenceCategory: Shorts, PreferenceScreen: Shorts player, PreferenceCategory: Suggested actions -->
<string name="revanced_preference_category_suggested_actions">Suggested actions</string>

<string name="revanced_hide_shorts_green_screen_button_title">Hide Green screen button</string>
<string name="revanced_hide_shorts_green_screen_button_summary_on">Green screen button is hidden.</string>
<string name="revanced_hide_shorts_green_screen_button_summary_off">Green screen button is shown.</string>
<string name="revanced_hide_shorts_save_sound_button_title">Hide Save sound button</string>
<string name="revanced_hide_shorts_save_sound_button_summary_on">Save sound button is hidden.</string>
<string name="revanced_hide_shorts_save_sound_button_summary_off">Save sound button is shown.</string>
<string name="revanced_hide_shorts_shop_button_title">Hide Shop button</string>
<string name="revanced_hide_shorts_shop_button_summary_on">Shop button is hidden.</string>
<string name="revanced_hide_shorts_shop_button_summary_off">Shop button is shown.</string>
<string name="revanced_hide_shorts_super_thanks_button_title">Hide Super Thanks button</string>
<string name="revanced_hide_shorts_super_thanks_button_summary_on">Super Thanks button is hidden.</string>
<string name="revanced_hide_shorts_super_thanks_button_summary_off">Super Thanks button is shown.</string>
<string name="revanced_hide_shorts_use_this_sound_button_title">Hide Use this sound button</string>
<string name="revanced_hide_shorts_use_this_sound_button_summary_on">Use this sound button is hidden.</string>
<string name="revanced_hide_shorts_use_this_sound_button_summary_off">Use this sound button is shown.</string>
<string name="revanced_hide_shorts_use_template_button_title">Hide Use template button</string>
<string name="revanced_hide_shorts_use_template_button_summary_on">Use template button is hidden.</string>
<string name="revanced_hide_shorts_use_template_button_summary_off">Use template button is shown.</string>
<string name="revanced_hide_shorts_location_button_title">Hide location button</string>
<string name="revanced_hide_shorts_location_button_summary_on">Location button is hidden.</string>
<string name="revanced_hide_shorts_location_button_summary_off">Location button is shown.</string>
<string name="revanced_hide_shorts_search_suggestions_button_title">Hide search suggestions button</string>
<string name="revanced_hide_shorts_search_suggestions_button_summary_on">Search suggestions button is hidden.</string>
<string name="revanced_hide_shorts_search_suggestions_button_summary_off">Search suggestions button is shown.</string>
<string name="revanced_hide_shorts_tagged_products_title">Hide tagged products</string>
<string name="revanced_hide_shorts_tagged_products_summary_on">Tagged products are hidden.</string>
<string name="revanced_hide_shorts_tagged_products_summary_off">Tagged products are shown.</string>

<!-- PreferenceScreen: Shorts, PreferenceCategory: Shorts, PreferenceScreen: Shorts player, PreferenceCategory: Action buttons -->
<string name="revanced_preference_category_action_buttons">Action buttons</string>
<string name="revanced_hide_shorts_like_button_title">Hide Like button</string>
Expand Down
19 changes: 11 additions & 8 deletions src/main/resources/youtube/settings/xml/revanced_prefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -501,21 +501,24 @@
<SwitchPreference android:title="@string/revanced_hide_shorts_paid_promotion_label_title" android:key="revanced_hide_shorts_paid_promotion_label" android:summaryOn="@string/revanced_hide_shorts_paid_promotion_label_summary_on" android:summaryOff="@string/revanced_hide_shorts_paid_promotion_label_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_trends_button_title" android:key="revanced_hide_shorts_trends_button" android:summaryOn="@string/revanced_hide_shorts_trends_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_trends_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_shopping_button_title" android:key="revanced_hide_shorts_shopping_button" android:summaryOn="@string/revanced_hide_shorts_shopping_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_shopping_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_shop_button_title" android:key="revanced_hide_shorts_shop_button" android:summaryOn="@string/revanced_hide_shorts_shop_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_shop_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_super_thanks_button_title" android:key="revanced_hide_shorts_super_thanks_button" android:summaryOn="@string/revanced_hide_shorts_super_thanks_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_super_thanks_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_tagged_products_title" android:key="revanced_hide_shorts_tagged_products" android:summaryOn="@string/revanced_hide_shorts_tagged_products_summary_on" android:summaryOff="@string/revanced_hide_shorts_tagged_products_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_location_button_title" android:key="revanced_hide_shorts_location_button" android:summaryOn="@string/revanced_hide_shorts_location_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_location_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_save_sound_button_title" android:key="revanced_hide_shorts_save_sound_button" android:summaryOn="@string/revanced_hide_shorts_save_sound_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_save_sound_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_search_suggestions_button_title" android:key="revanced_hide_shorts_search_suggestions_button" android:summaryOn="@string/revanced_hide_shorts_search_suggestions_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_search_suggestions_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_use_this_sound_button_title" android:key="revanced_hide_shorts_use_this_sound_button" android:summaryOn="@string/revanced_hide_shorts_use_this_sound_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_use_this_sound_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_use_template_button_title" android:key="revanced_hide_shorts_use_template_button" android:summaryOn="@string/revanced_hide_shorts_use_template_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_use_template_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_info_panel_title" android:key="revanced_hide_shorts_info_panel" android:summaryOn="@string/revanced_hide_shorts_info_panel_summary_on" android:summaryOff="@string/revanced_hide_shorts_info_panel_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_live_header_title" android:key="revanced_hide_shorts_live_header" android:summaryOn="@string/revanced_hide_shorts_live_header_summary_on" android:summaryOff="@string/revanced_hide_shorts_live_header_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_channel_bar_title" android:key="revanced_hide_shorts_channel_bar" android:summaryOn="@string/revanced_hide_shorts_channel_bar_summary_on" android:summaryOff="@string/revanced_hide_shorts_channel_bar_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_video_title_title" android:key="revanced_hide_shorts_video_title" android:summaryOn="@string/revanced_hide_shorts_video_title_summary_on" android:summaryOff="@string/revanced_hide_shorts_video_title_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_sound_metadata_label_title" android:key="revanced_hide_shorts_sound_metadata_label" android:summaryOn="@string/revanced_hide_shorts_sound_metadata_label_summary_on" android:summaryOff="@string/revanced_hide_shorts_sound_metadata_label_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_full_video_link_label_title" android:key="revanced_hide_shorts_full_video_link_label" android:summaryOn="@string/revanced_hide_shorts_full_video_link_label_summary_on" android:summaryOff="@string/revanced_hide_shorts_full_video_link_label_summary_off" />
<PreferenceCategory android:title="@string/revanced_preference_category_suggested_actions" android:layout="@layout/revanced_settings_preferences_category"/>
<SwitchPreference android:title="@string/revanced_hide_shorts_green_screen_button_title" android:key="revanced_hide_shorts_green_screen_button" android:summaryOn="@string/revanced_hide_shorts_green_screen_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_green_screen_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_save_sound_button_title" android:key="revanced_hide_shorts_save_sound_button" android:summaryOn="@string/revanced_hide_shorts_save_sound_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_save_sound_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_shop_button_title" android:key="revanced_hide_shorts_shop_button" android:summaryOn="@string/revanced_hide_shorts_shop_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_shop_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_super_thanks_button_title" android:key="revanced_hide_shorts_super_thanks_button" android:summaryOn="@string/revanced_hide_shorts_super_thanks_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_super_thanks_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_use_this_sound_button_title" android:key="revanced_hide_shorts_use_this_sound_button" android:summaryOn="@string/revanced_hide_shorts_use_this_sound_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_use_this_sound_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_use_template_button_title" android:key="revanced_hide_shorts_use_template_button" android:summaryOn="@string/revanced_hide_shorts_use_template_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_use_template_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_location_button_title" android:key="revanced_hide_shorts_location_button" android:summaryOn="@string/revanced_hide_shorts_location_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_location_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_search_suggestions_button_title" android:key="revanced_hide_shorts_search_suggestions_button" android:summaryOn="@string/revanced_hide_shorts_search_suggestions_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_search_suggestions_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_tagged_products_title" android:key="revanced_hide_shorts_tagged_products" android:summaryOn="@string/revanced_hide_shorts_tagged_products_summary_on" android:summaryOff="@string/revanced_hide_shorts_tagged_products_summary_off" />
<PreferenceCategory android:title="@string/revanced_preference_category_action_buttons" android:layout="@layout/revanced_settings_preferences_category"/>
<SwitchPreference android:title="@string/revanced_hide_shorts_like_button_title" android:key="revanced_hide_shorts_like_button" android:summaryOn="@string/revanced_hide_shorts_like_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_like_button_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_shorts_dislike_button_title" android:key="revanced_hide_shorts_dislike_button" android:summaryOn="@string/revanced_hide_shorts_dislike_button_summary_on" android:summaryOff="@string/revanced_hide_shorts_dislike_button_summary_off" />
Expand Down

0 comments on commit ec68f16

Please sign in to comment.