Browse Source

Update destination when picking new destination

Signed-off-by: Philippe Weidmann <philippe.weidmann@infomaniak.com>
Philippe Weidmann 5 years ago
parent
commit
e37aad6570

+ 1 - 1
iOSClient/Select/NCSelect.swift

@@ -262,7 +262,7 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, NCListCellDelegat
     }
     
     @IBAction func actionDone(_ sender: Any) {
-        delegate?.dismissSelect(serverUrl: serverUrl, metadata: nil, type: type)
+        delegate?.dismissSelect(serverUrl: serverUrl, metadata: metadataFolder, type: type)
         self.dismiss(animated: true, completion: nil)
     }
     

+ 1 - 0
iOSClient/UploadFromOtherUpp/CCUploadFromOtherUpp.h

@@ -26,5 +26,6 @@
 @interface CCUploadFromOtherUpp : UITableViewController <UITableViewDelegate, UITableViewDataSource>
 @property (weak, nonatomic) IBOutlet UILabel *fileSizeLabel;
 @property (weak, nonatomic) IBOutlet UITextField *fileNameTextfield;
+@property (weak, nonatomic) IBOutlet UILabel *destinationLabel;
 
 @end

+ 2 - 3
iOSClient/UploadFromOtherUpp/CCUploadFromOtherUpp.m

@@ -95,8 +95,7 @@
         case 2:
             if (row == 0) {
     
-                nameLabel = (UILabel *)[cell viewWithTag:101];
-                nameLabel.text = destinationTitle;
+                self.destinationLabel.text = destinationTitle;
                 cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
                 UIImageView *img = (UIImageView *)[cell viewWithTag:201];
                 img.image = [UIImage imageNamed:@"folder"];
@@ -145,7 +144,7 @@
     if (serverUrl) {
         serverUrlLocal = serverUrl;
         destinationTitle = metadata.fileNameView;
-        //destinationTitle = NSLocalizedString(@"_home_", nil);
+        self.destinationLabel.text = destinationTitle;
     }
 }
 

+ 1 - 0
iOSClient/UploadFromOtherUpp/CCUploadFromOtherUpp.storyboard

@@ -162,6 +162,7 @@
                         </barButtonItem>
                     </navigationItem>
                     <connections>
+                        <outlet property="destinationLabel" destination="Dk7-2l-tvL" id="bvt-2R-EOe"/>
                         <outlet property="fileNameTextfield" destination="xkS-C6-OZA" id="8Qb-gc-i6C"/>
                         <outlet property="fileSizeLabel" destination="Glj-Ta-UnA" id="plu-w1-L9x"/>
                     </connections>