feat(youtube): show toasts along exceptions (#1511)

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
LisoUseInAIKyrios 2023-01-28 11:38:39 +04:00 committed by GitHub
parent b23299f198
commit 5817e4d27f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 13 deletions

View File

@ -29,7 +29,7 @@ class DebuggingPatch : ResourcePatch {
listOf( listOf(
SwitchPreference( SwitchPreference(
"revanced_debug_enabled", "revanced_debug_enabled",
StringResource("revanced_debug_enabled_title", "Enable debug logs"), StringResource("revanced_debug_enabled_title", "Debug logging"),
false, false,
StringResource("revanced_debug_summary_on", "Debug logs are enabled"), StringResource("revanced_debug_summary_on", "Debug logs are enabled"),
StringResource("revanced_debug_summary_off", "Debug logs are disabled") StringResource("revanced_debug_summary_off", "Debug logs are disabled")
@ -38,11 +38,21 @@ class DebuggingPatch : ResourcePatch {
"revanced_debug_stacktrace_enabled", "revanced_debug_stacktrace_enabled",
StringResource( StringResource(
"revanced_debug_stacktrace_enabled_title", "revanced_debug_stacktrace_enabled_title",
"Print stack traces" "Log stack traces"
), ),
false, false,
StringResource("revanced_debug_stacktrace_summary_on", "Enabled printing stack traces"), StringResource("revanced_debug_stacktrace_summary_on", "Debug logs include stack trace"),
StringResource("revanced_debug_stacktrace_summary_off", "Disabled printing stack traces") StringResource("revanced_debug_stacktrace_summary_off", "Debug logs do not include stack trace")
),
SwitchPreference(
"revanced_debug_toast_on_error_enabled",
StringResource(
"revanced_debug_toast_on_error_enabled_title",
"Show toast on ReVanced error"
),
true,
StringResource("revanced_debug_toast_on_error_summary_on", "Toast shown if error occurs"),
StringResource("revanced_debug_toast_on_error_summary_off", "Toast not shown if error occurs")
), ),
), ),
StringResource("revanced_debug_summary", "Enable or disable debugging options") StringResource("revanced_debug_summary", "Enable or disable debugging options")

View File

@ -3,10 +3,9 @@
<string name="revanced_ryd_failure_connection_timeout">Dislikes temporarily not available (API timed out)</string> <string name="revanced_ryd_failure_connection_timeout">Dislikes temporarily not available (API timed out)</string>
<string name="revanced_ryd_failure_client_rate_limit_requested">Dislikes not available (client API limit reached)</string> <string name="revanced_ryd_failure_client_rate_limit_requested">Dislikes not available (client API limit reached)</string>
<string name="revanced_ryd_failure_register_user">ReturnYouTubeDislike failed to register as new user</string>
<string name="revanced_ryd_failure_confirm_user">ReturnYouTubeDislike failed to confirm new user</string> <!-- corner case situation, where user enables RYD while video is playing and then tries to vote for the video -->
<string name="revanced_ryd_failure_send_vote_failed">ReturnYouTubeDislike failed to send vote</string> <string name="revanced_ryd_failure_ryd_enabled_while_playing_video_then_user_voted">Reload video to vote using ReturnYouTubeDislike</string>
<string name="revanced_ryd_failure_confirm_vote_failed">ReturnYouTubeDislike failed to confirm vote</string>
<string name="revanced_ryd_enable_title">Return YouTube Dislike</string> <string name="revanced_ryd_enable_title">Return YouTube Dislike</string>
<string name="revanced_ryd_enable_summary_on">Dislikes are shown</string> <string name="revanced_ryd_enable_summary_on">Dislikes are shown</string>
@ -34,16 +33,16 @@
<string name="revanced_ryd_statistics_getFetchCallResponseTimeLast_rate_limit_summary">Dislikes temporarily not available - Client API rate limit in effect</string> <string name="revanced_ryd_statistics_getFetchCallResponseTimeLast_rate_limit_summary">Dislikes temporarily not available - Client API rate limit in effect</string>
<string name="revanced_ryd_statistics_getFetchCallCount_title">API fetch votes, number of calls</string> <string name="revanced_ryd_statistics_getFetchCallCount_title">API fetch votes, number of calls</string>
<string name="revanced_ryd_statistics_getFetchCallCount_zero_summary">No network calls have been made</string> <string name="revanced_ryd_statistics_getFetchCallCount_zero_summary">No network calls made</string>
<string name="revanced_ryd_statistics_getFetchCallCount_non_zero_summary">%d network calls have been made</string> <string name="revanced_ryd_statistics_getFetchCallCount_non_zero_summary">%d network calls made</string>
<string name="revanced_ryd_statistics_getFetchCallNumberOfFailures_title">API fetch votes, number of timeouts</string> <string name="revanced_ryd_statistics_getFetchCallNumberOfFailures_title">API fetch votes, number of timeouts</string>
<string name="revanced_ryd_statistics_getFetchCallNumberOfFailures_zero_summary">No network calls have timed out</string> <string name="revanced_ryd_statistics_getFetchCallNumberOfFailures_zero_summary">No network calls timed out</string>
<string name="revanced_ryd_statistics_getFetchCallNumberOfFailures_non_zero_summary">%d network calls timed out</string> <string name="revanced_ryd_statistics_getFetchCallNumberOfFailures_non_zero_summary">%d network calls timed out</string>
<string name="revanced_ryd_statistics_getNumberOfRateLimitRequestsEncountered_title">API client rate limits</string> <string name="revanced_ryd_statistics_getNumberOfRateLimitRequestsEncountered_title">API client rate limits</string>
<string name="revanced_ryd_statistics_getNumberOfRateLimitRequestsEncountered_zero_summary">No client rate limits have been encountered</string> <string name="revanced_ryd_statistics_getNumberOfRateLimitRequestsEncountered_zero_summary">No client rate limits encountered</string>
<string name="revanced_ryd_statistics_getNumberOfRateLimitRequestsEncountered_non_zero_summary">Client rate limit was encountered %d times</string> <string name="revanced_ryd_statistics_getNumberOfRateLimitRequestsEncountered_non_zero_summary">Client rate limit encountered %d times</string>
<string name="revanced_ryd_statistics_millisecond_text">%d milliseconds</string> <string name="revanced_ryd_statistics_millisecond_text">%d milliseconds</string>
</resources> </resources>