소스 검색

richWorkspaceText available from iOS 11

marinofaggiana 5 년 전
부모
커밋
f9e33039ba
1개의 변경된 파일12개의 추가작업 그리고 10개의 파일을 삭제
  1. 12 10
      iOSClient/Main/Menu/AppDelegate+Menu.swift

+ 12 - 10
iOSClient/Main/Menu/AppDelegate+Menu.swift

@@ -127,17 +127,19 @@ extension AppDelegate {
             )
         )
 
-        if let capabilities = NCManageDatabase.sharedInstance.getCapabilites(account: appDelegate.activeAccount) {
-            if (capabilities.versionMajor >= k_nextcloud_version_18_0 && (self.activeMain.richWorkspaceText == nil || self.activeMain.richWorkspaceText.count == 0)) {
-                actions.append(
-                    NCMenuAction(
-                        title: NSLocalizedString("_add_folder_info_", comment: ""),
-                        icon: CCGraphics.changeThemingColorImage(UIImage(named: "addFolderInfo"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon),
-                        action: { menuAction in
-                            self.activeMain.createRichWorkspace()
-                        }
+        if #available(iOS 11.0, *) {
+            if let capabilities = NCManageDatabase.sharedInstance.getCapabilites(account: appDelegate.activeAccount) {
+                if (capabilities.versionMajor >= k_nextcloud_version_18_0 && (self.activeMain.richWorkspaceText == nil || self.activeMain.richWorkspaceText.count == 0)) {
+                    actions.append(
+                        NCMenuAction(
+                            title: NSLocalizedString("_add_folder_info_", comment: ""),
+                            icon: CCGraphics.changeThemingColorImage(UIImage(named: "addFolderInfo"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon),
+                            action: { menuAction in
+                                self.activeMain.createRichWorkspace()
+                            }
+                        )
                     )
-                )
+                }
             }
         }