marinofaggiana преди 5 години
родител
ревизия
57ad82cb0f
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 5 1
      iOSClient/Networking/CCNetworking.m

+ 5 - 1
iOSClient/Networking/CCNetworking.m

@@ -523,7 +523,7 @@
     [appDelegate.listProgressMetadata removeObjectForKey:ocId];
 #endif
     
-     tableMetadata *metadata = [[NCManageDatabase sharedInstance] getMetadataWithPredicate:[NSPredicate predicateWithFormat:@"ocId == %@", ocId]];
+    tableMetadata *metadata = [[NCManageDatabase sharedInstance] getMetadataWithPredicate:[NSPredicate predicateWithFormat:@"ocId == %@", ocId]];
     
     if (errorCode != 0) {
         
@@ -581,6 +581,10 @@
             }
         }
         
+        // NSNotificationCenter
+        NSDictionary* userInfo = @{@"metadata": metadata};
+        [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:k_notificationCenter_downloadFile object:nil userInfo:userInfo];
+        
         // Exif
         if ([metadata.typeFile isEqualToString: k_metadataTypeFile_image])
             [[CCExifGeo sharedInstance] setExifLocalTableEtag:metadata];