Marino Faggiana 6 years ago
parent
commit
8fb905b55f
3 changed files with 7 additions and 3 deletions
  1. 1 0
      iOSClient/Move/CCMove.h
  2. 2 3
      iOSClient/Move/CCMove.m
  3. 4 0
      iOSClient/Richdocument/NCRichdocument.swift

+ 1 - 0
iOSClient/Move/CCMove.h

@@ -39,6 +39,7 @@
 @property (nonatomic, weak) id <CCMoveDelegate> delegate;
 @property (nonatomic, strong) NSOperationQueue *networkingOperationQueue;
 @property BOOL includeDirectoryE2EEncryption;
+@property BOOL includeImages;
 @property BOOL hideCreateFolder;
 
 @property (nonatomic, strong) NSString *serverUrl;

+ 2 - 3
iOSClient/Move/CCMove.m

@@ -364,9 +364,8 @@
     NSString *directoryID = [[NCManageDatabase sharedInstance] getDirectoryID:_serverUrl];
     if (!directoryID) return 0;
     NSPredicate *predicate;
-    
-    if (self.includeDirectoryE2EEncryption) predicate = [NSPredicate predicateWithFormat:@"directoryID == %@ AND directory == true", directoryID];
-    else predicate = [NSPredicate predicateWithFormat:@"directoryID == %@ AND directory == true AND e2eEncrypted == false", directoryID];
+
+    predicate = [NSPredicate predicateWithFormat:@"directoryID == %@ AND directory == true AND e2eEncrypted == %@", directoryID, [NSNumber numberWithBool:self.includeDirectoryE2EEncryption]];
     
     NSArray *result = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:predicate sorted:nil ascending:NO];
     

+ 4 - 0
iOSClient/Richdocument/NCRichdocument.swift

@@ -62,6 +62,7 @@ class NCRichdocument: NSObject, WKNavigationDelegate, WKScriptMessageHandler {
     public func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
         
         if (message.name == "RichDocumentsMobileInterface") {
+            
             if message.body as! String == "close" {
 
                 self.webView.removeFromSuperview()
@@ -69,6 +70,9 @@ class NCRichdocument: NSObject, WKNavigationDelegate, WKScriptMessageHandler {
                 self.viewDetail.navigationController?.popToRootViewController(animated: true)
                 self.viewDetail.navigationController?.navigationBar.topItem?.title = ""
             }
+            
+            if message.body as! String == "insertGraphic" {
+            }
         }
     }