marinofaggiana 5 年之前
父节点
当前提交
25740ad3a6
共有 1 个文件被更改,包括 12 次插入1 次删除
  1. 12 1
      iOSClient/RichWorkspace/NCRichWorkspace.swift

+ 12 - 1
iOSClient/RichWorkspace/NCRichWorkspace.swift

@@ -42,7 +42,18 @@ import MarkdownKit
     }
 
     @objc func changeTheming() {
-        if NCBrandColor.sharedInstance.textView != self.textViewColor {
+        var textColor = NCBrandColor.sharedInstance.textView
+        if #available(iOS 13.0, *) {
+            if CCUtility.getDarkModeDetect() {
+                if traitCollection.userInterfaceStyle == .dark {
+                    textColor = .white
+                } else {
+                    textColor = .black
+                }
+            }
+        }
+                
+        if textColor != self.textViewColor {
             markdownParser = MarkdownParser(font: UIFont.systemFont(ofSize: 15), color: NCBrandColor.sharedInstance.textView)
             markdownParser.header.font = UIFont.systemFont(ofSize: 25)
             if let richWorkspaceText = richWorkspaceText {