Marino Faggiana 7 жил өмнө
parent
commit
32c1e19701

+ 7 - 0
iOSClient/Main/CCDetail.m

@@ -64,6 +64,8 @@
         
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(triggerProgressTask:) name:@"NotificationProgressTask" object:nil];
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(backNavigationController) name:@"detailBack" object:nil];
+
 
         self.metadataDetail = [[tableMetadata alloc] init];
         self.photos = [[NSMutableArray alloc] init];
@@ -168,6 +170,11 @@
     self.navigationController.navigationBarHidden = YES;
 }
 
+- (void)backNavigationController
+{
+    [self.navigationController popViewControllerAnimated:NO];
+}
+
 - (void)changeToDisplayMode
 {
     if (_readerPDFViewController)

+ 6 - 2
iOSClient/Text/NCText.swift

@@ -108,8 +108,12 @@ class NCText: UIViewController, UITextViewDelegate {
                 metadata.sessionTaskIdentifier = Int(k_taskIdentifierWaitStart)
                 _ = NCManageDatabase.sharedInstance.updateMetadata(metadata)
                 
-                self.dismiss(animated: true, completion: nil)
-                
+                self.dismiss(animated: true, completion: {
+                    
+                    CCNetworking.shared().uploadFileMetadata(metadata, taskStatus: Int(k_taskStatusResume))
+                    NotificationCenter.default.post(name: NSNotification.Name(rawValue: "detailBack"), object: nil)
+                })
+
             } else {
                 self.appDelegate.messageNotification("_error_", description: "_error_creation_file_", visible: true, delay: TimeInterval(k_dismissAfterSecond), type: TWMessageBarMessageType.info, errorCode: 0)
             }