mirror of
https://github.com/revanced/revanced-integrations
synced 2024-11-22 05:02:19 +01:00
fix(YouTube - Announcements): Don't show error toast if there is no internet connection (#537)
This commit is contained in:
parent
fb56e9a362
commit
0ce92c284d
@ -32,6 +32,9 @@ public final class AnnouncementsPatch {
|
||||
public static void showAnnouncement(final Activity context) {
|
||||
if (!SettingsEnum.ANNOUNCEMENTS.getBoolean()) return;
|
||||
|
||||
// Check if there is internet connection
|
||||
if (!ReVancedUtils.isNetworkConnected()) return;
|
||||
|
||||
ReVancedUtils.runOnBackgroundThread(() -> {
|
||||
try {
|
||||
HttpURLConnection connection = AnnouncementsRoutes.getAnnouncementsConnectionFromRoute(GET_LATEST_ANNOUNCEMENT, CONSUMER);
|
||||
|
Loading…
Reference in New Issue
Block a user