From 88f821d348460b3d295f783db227e9b21ee6e668 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Wed, 11 Sep 2024 20:33:25 -0500 Subject: [PATCH] Update LowContrastMode Option (uYouPlusSettings.xm) --- Sources/uYouPlusSettings.xm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/uYouPlusSettings.xm b/Sources/uYouPlusSettings.xm index 5698a72..3f565c8 100644 --- a/Sources/uYouPlusSettings.xm +++ b/Sources/uYouPlusSettings.xm @@ -609,6 +609,12 @@ extern NSBundle *uYouPlusBundle(); [alert addAction:okAction]; [settingsViewController presentViewController:alert animated:YES completion:nil]; return NO; + } else if (UIScreen.mainScreen.traitCollection.userInterfaceStyle != UIUserInterfaceStyleDark) { + UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Light Mode Detected" message:@"LowContrastMode is only available in Dark Mode. Please switch to Dark Mode to be able to use LowContrastMode." preferredStyle:UIAlertControllerStyleAlert]; + UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]; + [alert addAction:okAction]; + [settingsViewController presentViewController:alert animated:YES completion:nil]; + return NO; } } [[NSUserDefaults standardUserDefaults] setBool:enable forKey:@"lowContrastMode_enabled"];