소스 검색

Check dark mode at first launch - Fix #1052

Signed-off-by: Philippe Weidmann <philippe.weidmann@infomaniak.com>
Philippe Weidmann 5 년 전
부모
커밋
ab0e1ad23c
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  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];
 }