diff --git a/extensions/shared/library/src/main/java/app/revanced/extension/shared/patches/CheckWatchHistoryDomainNameResolutionPatch.java b/extensions/shared/library/src/main/java/app/revanced/extension/shared/patches/CheckWatchHistoryDomainNameResolutionPatch.java index ff2c55ade..23321c0e5 100644 --- a/extensions/shared/library/src/main/java/app/revanced/extension/shared/patches/CheckWatchHistoryDomainNameResolutionPatch.java +++ b/extensions/shared/library/src/main/java/app/revanced/extension/shared/patches/CheckWatchHistoryDomainNameResolutionPatch.java @@ -46,7 +46,7 @@ public class CheckWatchHistoryDomainNameResolutionPatch { /** * Injection point. * - * Checks if s.youtube.com is blacklisted and playback history will fail to work. + * Checks if YouTube watch history endpoint cannot be reached. */ public static void checkDnsResolver(Activity context) { if (!Utils.isNetworkConnected() || !BaseSettings.CHECK_WATCH_HISTORY_DOMAIN_NAME.get()) return; @@ -67,28 +67,20 @@ public class CheckWatchHistoryDomainNameResolutionPatch { } Utils.runOnMainThread(() -> { - try { - // Create the custom dialog. - Pair dialogPair = CustomDialog.create( - context, - str("revanced_check_watch_history_domain_name_dialog_title"), // Title. - Html.fromHtml(str("revanced_check_watch_history_domain_name_dialog_message")), // Message (HTML). - null, // No EditText. - null, // OK button text. - () -> {}, // OK button action (just dismiss). - () -> {}, // Cancel button action (just dismiss). - str("revanced_check_watch_history_domain_name_dialog_ignore"), // Neutral button text. - () -> BaseSettings.CHECK_WATCH_HISTORY_DOMAIN_NAME.save(false), // Neutral button action (Ignore). - true // Dismiss dialog on Neutral button click. - ); + Pair dialogPair = CustomDialog.create( + context, + str("revanced_check_watch_history_domain_name_dialog_title"), // Title. + Html.fromHtml(str("revanced_check_watch_history_domain_name_dialog_message")), // Message (HTML). + null, // No EditText. + null, // OK button text. + () -> {}, // OK button action (just dismiss). + null, // No cancel button. + str("revanced_check_watch_history_domain_name_dialog_ignore"), // Neutral button text. + () -> BaseSettings.CHECK_WATCH_HISTORY_DOMAIN_NAME.save(false), // Neutral button action (Ignore). + true // Dismiss dialog on Neutral button click. + ); - // Show the dialog. - Dialog dialog = dialogPair.first; - - Utils.showDialog(context, dialog, false, null); - } catch (Exception ex) { - Logger.printException(() -> "checkDnsResolver dialog creation failure", ex); - } + Utils.showDialog(context, dialogPair.first, false, null); }); } catch (Exception ex) { Logger.printException(() -> "checkDnsResolver failure", ex);