浏览代码

Improvements favorite view

Marino Faggiana 7 年之前
父节点
当前提交
92a137794e

+ 1 - 1
iOSClient/Brand/Picker.plist

@@ -19,7 +19,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>2.17.4</string>
 	<key>CFBundleVersion</key>
-	<string>00028</string>
+	<string>00029</string>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>

+ 1 - 1
iOSClient/Brand/PickerFileProvider.plist

@@ -19,7 +19,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>2.17.4</string>
 	<key>CFBundleVersion</key>
-	<string>00028</string>
+	<string>00029</string>
 	<key>NSExtension</key>
 	<dict>
 		<key>NSExtensionFileProviderDocumentGroup</key>

+ 1 - 1
iOSClient/Brand/Share.plist

@@ -19,7 +19,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>2.17.4</string>
 	<key>CFBundleVersion</key>
-	<string>00028</string>
+	<string>00029</string>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>

+ 1 - 1
iOSClient/Brand/iOSClient.plist

@@ -69,7 +69,7 @@
 		</dict>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>00028</string>
+	<string>00029</string>
 	<key>Fabric</key>
 	<dict>
 		<key>APIKey</key>

+ 26 - 6
iOSClient/Favorites/CCFavorites.m

@@ -476,6 +476,18 @@
     [actionSheet show];
 }
 
+- (void)tapActionConnectionMounted:(UITapGestureRecognizer *)tapGesture
+{
+    CGPoint location = [tapGesture locationInView:self.tableView];
+    NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:location];
+    
+    tableMetadata *metadata = [_dataSource objectAtIndex:indexPath.row];
+
+    if (metadata)
+        [app.activeMain openWindowShare:metadata];
+}
+
+
 #pragma mark -
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ===== Swipe Tablet -> menu =====
@@ -585,6 +597,7 @@
     cell.status.image = nil;
     cell.favorite.image = nil;
     cell.local.image = nil;
+    cell.shared.image = nil;
         
     // change color selection
     UIView *selectionColor = [[UIView alloc] init];
@@ -626,10 +639,17 @@
             
     } else {
             
-        if ([shareLink length] > 0) {
-            cell.shared.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"shareLink"] color:[NCBrandColor sharedInstance].brand];
-        } else if ([shareUserAndGroup length] > 0) {
-            cell.shared.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"actionSheetShare"] color:[NCBrandColor sharedInstance].brand];
+        if ([shareLink length] > 0 || [shareUserAndGroup length] > 0) {
+            
+            if ([shareLink length] > 0)
+                cell.shared.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"shareLink"] color:[NCBrandColor sharedInstance].brand];
+            else
+                cell.shared.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"actionSheetShare"] color:[NCBrandColor sharedInstance].brand];
+                
+            UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapActionConnectionMounted:)];
+            [tap setNumberOfTapsRequired:1];
+            cell.shared.userInteractionEnabled = YES;
+            [cell.shared addGestureRecognizer:tap];
         }
         
         cell.file.image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.ico", app.directoryUser, metadata.fileID]];
@@ -651,8 +671,8 @@
     if (metadata.directory) {
         
         cell.labelInfoFile.text = [CCUtility dateDiff:metadata.date];
-        cell.accessoryType = UITableViewCellAccessoryNone;
-        //cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+        //cell.accessoryType = UITableViewCellAccessoryNone;
+        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
           
     } else {