Explorar el Código

Merge pull request #1053 from Infomaniak/fix-darkmode

Check dark mode at first launch - Fix #1052
Marino Faggiana hace 5 años
padre
commit
b20d789351
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      iOSClient/Utility/CCUtility.m

+ 5 - 0
iOSClient/Utility/CCUtility.m

@@ -659,6 +659,11 @@
 
 + (BOOL)getDarkMode
 {
+    if ([self getDarkModeDetect]) {
+        if (@available(iOS 12.0, *)) {
+            return [UIScreen mainScreen].traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark;
+        }
+    }
     return [[UICKeyChainStore stringForKey:@"darkMode" service:k_serviceShareKeyChain] boolValue];
 }