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;