Browse Source

clear code

marinofaggiana 4 years ago
parent
commit
ac98502748
2 changed files with 8 additions and 9 deletions
  1. 6 0
      Share/ShareViewController.m
  2. 2 9
      iOSClient/AppDelegate.m

+ 6 - 0
Share/ShareViewController.m

@@ -68,6 +68,12 @@
         NSInteger levelLog = [CCUtility getLogLevel];
         NSInteger levelLog = [CCUtility getLogLevel];
         [[NCCommunicationCommon shared] setLevelLog:levelLog];
         [[NCCommunicationCommon shared] setLevelLog:levelLog];
         
         
+        NSString *pathDirectoryGroup = [[CCUtility getDirectoryGroup] path];
+        [[NCCommunicationCommon shared] setPathLog: pathDirectoryGroup];
+                
+        NSString *versionNextcloudiOS = [NSString stringWithFormat:[NCBrandOptions shared].textCopyrightNextcloudiOS, NCUtility.shared.getVersionApp];
+        [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"Start session with level %lu %@", (unsigned long)levelLog, versionNextcloudiOS]];
+        
         // Networking
         // Networking
         [[NCCommunicationCommon shared] setupWithAccount:tableAccount.account user:tableAccount.user userId:tableAccount.userID password:[CCUtility getPassword:tableAccount.account] urlBase:tableAccount.urlBase userAgent:[CCUtility getUserAgent] webDav:webDav dav:nil nextcloudVersion:serverVersionMajor delegate:[NCNetworking shared]];
         [[NCCommunicationCommon shared] setupWithAccount:tableAccount.account user:tableAccount.user userId:tableAccount.userID password:[CCUtility getPassword:tableAccount.account] urlBase:tableAccount.urlBase userAgent:[CCUtility getUserAgent] webDav:webDav dav:nil nextcloudVersion:serverVersionMajor delegate:[NCNetworking shared]];
        
        

+ 2 - 9
iOSClient/AppDelegate.m

@@ -62,15 +62,8 @@
     
     
     NSString *pathDirectoryGroup = [[CCUtility getDirectoryGroup] path];
     NSString *pathDirectoryGroup = [[CCUtility getDirectoryGroup] path];
     [[NCCommunicationCommon shared] setPathLog: pathDirectoryGroup];
     [[NCCommunicationCommon shared] setPathLog: pathDirectoryGroup];
-    
-#ifdef DEBUG
-    [[NCCommunicationCommon shared] setPrintLog:true];
-#else
-    [[NCCommunicationCommon shared] setPrintLog:false];
-#endif
-    
-    NSString *versionApp = [[NCUtility shared] getVersionApp];
-    NSString *versionNextcloudiOS = [NSString stringWithFormat:[NCBrandOptions shared].textCopyrightNextcloudiOS, versionApp];
+        
+    NSString *versionNextcloudiOS = [NSString stringWithFormat:[NCBrandOptions shared].textCopyrightNextcloudiOS, NCUtility.shared.getVersionApp];
     if (isSimulatorOrTestFlight) {
     if (isSimulatorOrTestFlight) {
         [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"Start session with level %lu %@ (Simulator / TestFlight)", (unsigned long)levelLog, versionNextcloudiOS]];
         [[NCCommunicationCommon shared] writeLog:[NSString stringWithFormat:@"Start session with level %lu %@ (Simulator / TestFlight)", (unsigned long)levelLog, versionNextcloudiOS]];
     } else {
     } else {