marinofaggiana 6 年之前
父節點
當前提交
dc514430e1
共有 1 個文件被更改,包括 12 次插入15 次删除
  1. 12 15
      iOSClient/PeekPop/CCPeekPop.m

+ 12 - 15
iOSClient/PeekPop/CCPeekPop.m

@@ -69,21 +69,18 @@
 {
     NSMutableArray *items = [NSMutableArray new];
  
-    if (self.metadata.directory == false) {
-        
-        if (self.showOpenIn) {
-            UIPreviewAction *openIn = [UIPreviewAction actionWithTitle:NSLocalizedString(@"_open_in_", nil) style:UIPreviewActionStyleDefault handler:^(UIPreviewAction *action,  UIViewController *previewViewController){
-                [[NCMainCommon sharedInstance] downloadOpenInMetadata:self.metadata];
-            }];
-            [items addObject:openIn];
-        }
-        
-        if (self.showShare) {
-            UIPreviewAction *share = [UIPreviewAction actionWithTitle:NSLocalizedString(@"_share_", nil) style:UIPreviewActionStyleDefault handler:^(UIPreviewAction *action,  UIViewController *previewViewController){
-                [appDelegate.activeMain readShareWithAccount:appDelegate.activeAccount openWindow:YES metadata:self.metadata];
-            }];
-            [items addObject:share];
-        }
+    if (self.showOpenIn && !self.metadata.directory) {
+        UIPreviewAction *openIn = [UIPreviewAction actionWithTitle:NSLocalizedString(@"_open_in_", nil) style:UIPreviewActionStyleDefault handler:^(UIPreviewAction *action,  UIViewController *previewViewController){
+            [[NCMainCommon sharedInstance] downloadOpenInMetadata:self.metadata];
+        }];
+        [items addObject:openIn];
+    }
+    
+    if (self.showShare) {
+        UIPreviewAction *share = [UIPreviewAction actionWithTitle:NSLocalizedString(@"_share_", nil) style:UIPreviewActionStyleDefault handler:^(UIPreviewAction *action,  UIViewController *previewViewController){
+            [appDelegate.activeMain readShareWithAccount:appDelegate.activeAccount openWindow:YES metadata:self.metadata];
+        }];
+        [items addObject:share];
     }
     
     return items;