Procházet zdrojové kódy

Unable to mark Favorite on folder #373

Marino Faggiana před 7 roky
rodič
revize
b0833ee590
2 změnil soubory, kde provedl 4 přidání a 3 odebrání
  1. 2 1
      iOSClient/Main/CCMain.m
  2. 2 2
      iOSClient/Networking/OCNetworking.m

+ 2 - 1
iOSClient/Main/CCMain.m

@@ -1129,8 +1129,9 @@
     if (![metadataNet.account isEqualToString:appDelegate.activeAccount])
         return;
     
-    // Update User (+ userProfile.id)
+    // Update User (+ userProfile.id) & account network
     [[NCManageDatabase sharedInstance] setAccountsUserProfile:userProfile];
+    [[CCNetworking sharedNetworking] settingAccount];
 
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
         

+ 2 - 2
iOSClient/Networking/OCNetworking.m

@@ -413,7 +413,7 @@
                 }
                 // ------------------------
             
-                NSRange firstInstance = [itemDto.filePath rangeOfString:[NSString stringWithFormat:@"%@/files/%@", dav, _activeUser]];
+                NSRange firstInstance = [itemDto.filePath rangeOfString:[NSString stringWithFormat:@"%@/files/%@", dav, _activeUserID]];
                 NSRange finalRange = NSMakeRange(firstInstance.location + firstInstance.length, itemDto.filePath.length-(firstInstance.location + firstInstance.length));
                 if (finalRange.location != NSNotFound && finalRange.location + finalRange.length <= itemDto.filePath.length) {
                     // It's safe to use range on str
@@ -572,7 +572,7 @@
             }
             // ------------------------
             
-            NSRange firstInstance = [itemDto.filePath rangeOfString:[NSString stringWithFormat:@"%@/files/%@", dav, _activeUser]];
+            NSRange firstInstance = [itemDto.filePath rangeOfString:[NSString stringWithFormat:@"%@/files/%@", dav, _activeUserID]];
             NSRange finalRange = NSMakeRange(firstInstance.location + firstInstance.length, itemDto.filePath.length-(firstInstance.location + firstInstance.length));
             
             if (finalRange.location != NSNotFound && finalRange.location + finalRange.length <= itemDto.filePath.length) {