Browse Source

fix message

Marino Faggiana 7 years ago
parent
commit
996acf9c70
2 changed files with 7 additions and 4 deletions
  1. 5 2
      iOSClient/AppDelegate.m
  2. 2 2
      iOSClient/Networking/CCNetworking.m

+ 5 - 2
iOSClient/AppDelegate.m

@@ -742,8 +742,11 @@
                 
             } else {
                 
-                [TWMessageBarManager sharedInstance].styleSheet = self;
-                [[TWMessageBarManager sharedInstance] showMessageWithTitle:[NSString stringWithFormat:@"%@\n", NSLocalizedString(title, nil)] description:NSLocalizedString(description, nil) type:type duration:delay];
+                if (description.length > 0) {
+                
+                    [TWMessageBarManager sharedInstance].styleSheet = self;
+                    [[TWMessageBarManager sharedInstance] showMessageWithTitle:[NSString stringWithFormat:@"%@\n", NSLocalizedString(title, nil)] description:NSLocalizedString(description, nil) type:type duration:delay];
+                }
             }
             
         } else {

+ 2 - 2
iOSClient/Networking/CCNetworking.m

@@ -442,7 +442,7 @@
                 
                 dispatch_async(dispatch_get_main_queue(), ^{
                     if ([self.delegate respondsToSelector:@selector(downloadFileFailure:serverUrl:selector:message:errorCode:)])
-                        [self.delegate downloadFileFailure:@"" serverUrl:serverUrl selector:@"" message:[NSString stringWithFormat:@"Serius error internal download : metadata not found %@", fileName] errorCode:k_CCErrorInternalError];
+                        [self.delegate downloadFileFailure:@"" serverUrl:serverUrl selector:@"" message:@"" errorCode:k_CCErrorInternalError];
                 });
             }
         }
@@ -488,7 +488,7 @@
             
                 dispatch_async(dispatch_get_main_queue(), ^{
                     if ([self.delegate respondsToSelector:@selector(uploadFileFailure:fileID:serverUrl:selector:message:errorCode:)])
-                        [self.delegate uploadFileFailure:nil fileID:@"" serverUrl:serverUrl selector:@"" message:[NSString stringWithFormat:@"Serius error internal download : metadata not found %@", fileName] errorCode:k_CCErrorInternalError];
+                        [self.delegate uploadFileFailure:nil fileID:@"" serverUrl:serverUrl selector:@"" message:@"" errorCode:k_CCErrorInternalError];
                 });
 
             }