Skip to content

Commit

Permalink
feat(Return YouTube Dislike): add Show estimated likes setting
Browse files Browse the repository at this point in the history
  • Loading branch information
inotia00 committed Oct 13, 2024
1 parent 678565d commit 40cecc6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ object ReturnYouTubeDislikePatch : BaseResourcePatch(
"false",
"revanced_ryd_enabled"
)
SettingsPatch.addSwitchPreference(
CategoryType.RETURN_YOUTUBE_DISLIKE,
"revanced_ryd_estimated_like",
"false",
"revanced_ryd_enabled"
)
SettingsPatch.addSwitchPreference(
CategoryType.RETURN_YOUTUBE_DISLIKE,
"revanced_ryd_toast_on_connection_error",
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/music/settings/host/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,8 @@ Some features may not work properly in the old player layout."</string>
<string name="revanced_ryd_dislike_percentage_summary">Displays the percentage of dislikes instead of the dislike count.</string>
<string name="revanced_ryd_compact_layout_title">Compact like button</string>
<string name="revanced_ryd_compact_layout_summary">Hides the separator of the like button.</string>
<string name="revanced_ryd_estimated_like_title">Show estimated likes</string>
<string name="revanced_ryd_estimated_like_summary">Shows the estimated like count of videos.</string>
<string name="revanced_ryd_toast_on_connection_error_title">Show a toast if API is unavailable</string>
<string name="revanced_ryd_toast_on_connection_error_summary">Shows a toast if the Return YouTube Dislike API is unavailable.</string>
<string name="revanced_ryd_about">About</string>
Expand All @@ -313,6 +315,7 @@ Some features may not work properly in the old player layout."</string>
<string name="revanced_ryd_failure_connection_status_code">Dislikes are unavailable (status %d).</string>
<string name="revanced_ryd_failure_client_rate_limit_requested">Dislikes are unavailable (client API limit reached).</string>
<string name="revanced_ryd_failure_generic">Dislikes are unavailable (%s).</string>
<string name="revanced_ryd_video_likes_hidden_by_video_owner">Hidden</string>


<!-- PreferenceScreen: SponsorBlock -->
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/youtube/settings/host/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1456,6 +1456,9 @@ Limitation: Dislikes may not appear if the user is not logged in or in incognito
<string name="revanced_ryd_compact_layout_title">Compact like button</string>
<string name="revanced_ryd_compact_layout_summary_on">Like button styled for minimum width.</string>
<string name="revanced_ryd_compact_layout_summary_off">Like button styled for best appearance.</string>
<string name="revanced_ryd_estimated_like_title">Show estimated likes</string>
<string name="revanced_ryd_estimated_like_summary_on">Estimated likes are shown.</string>
<string name="revanced_ryd_estimated_like_summary_off">Estimated likes are hidden.</string>
<string name="revanced_ryd_toast_on_connection_error_title">Show a toast if API is unavailable</string>
<string name="revanced_ryd_toast_on_connection_error_summary_on">Toast is shown if Return YouTube Dislike is unavailable.</string>
<string name="revanced_ryd_toast_on_connection_error_summary_off">Toast is not shown if Return YouTube Dislike is unavailable.</string>
Expand All @@ -1470,6 +1473,7 @@ Limitation: Dislikes may not appear if the user is not logged in or in incognito
<string name="revanced_ryd_failure_client_rate_limit_requested">Dislikes unavailable (client API limit reached).</string>
<string name="revanced_ryd_failure_generic">Dislikes unavailable (%s).</string>
<string name="revanced_ryd_failure_ryd_enabled_while_playing_video_then_user_voted">Reload video to vote using Return YouTube Dislike</string>
<string name="revanced_ryd_video_likes_hidden_by_video_owner">Hidden</string>


<!-- PreferenceScreen: SponsorBlock -->
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/youtube/settings/xml/revanced_prefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@
<SwitchPreference android:title="@string/revanced_ryd_shorts_title" android:key="ryd_shorts" android:summaryOn="@string/revanced_ryd_shorts_summary_on" android:summaryOff="@string/revanced_ryd_shorts_summary_off" />
<SwitchPreference android:title="@string/revanced_ryd_dislike_percentage_title" android:key="ryd_dislike_percentage" android:summaryOn="@string/revanced_ryd_dislike_percentage_summary_on" android:summaryOff="@string/revanced_ryd_dislike_percentage_summary_off" />
<SwitchPreference android:title="@string/revanced_ryd_compact_layout_title" android:key="ryd_compact_layout" android:summaryOn="@string/revanced_ryd_compact_layout_summary_on" android:summaryOff="@string/revanced_ryd_compact_layout_summary_off" />
<SwitchPreference android:title="@string/revanced_ryd_estimated_like_title" android:key="ryd_estimated_like" android:summaryOn="@string/revanced_ryd_estimated_like_summary_on" android:summaryOff="@string/revanced_ryd_estimated_like_summary_off" />
<SwitchPreference android:title="@string/revanced_ryd_toast_on_connection_error_title" android:key="ryd_toast_on_connection_error" android:summaryOn="@string/revanced_ryd_toast_on_connection_error_summary_on" android:summaryOff="@string/revanced_ryd_toast_on_connection_error_summary_off" />
<PreferenceCategory android:title="@string/revanced_ryd_about" android:layout="@layout/revanced_settings_preferences_category"/>
<Preference android:title="@string/revanced_ryd_attribution_title" android:key="revanced_ryd_attribution" android:summary="@string/revanced_ryd_attribution_summary">
Expand Down

0 comments on commit 40cecc6

Please sign in to comment.