Преглед изворни кода

1.修改Crash时保存上传队列前取消检查。
2.修改点击上传时Push上传队列视图。

Pen Li пре 9 година
родитељ
комит
cbb1f82417

BIN
RA Image/RA Image.xcodeproj/project.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 5 - 15
RA Image/RA Image.xcodeproj/xcuserdata/macmini1.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -3,29 +3,19 @@
    type = "1"
    version = "2.0">
    <Breakpoints>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            scope = "0"
-            stopOnStyle = "0">
-         </BreakpointContent>
-      </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "../common/upload/RAUploadOperation.m"
-            timestampString = "516015205.417642"
+            filePath = "../common/upload/RAUploadManager.m"
+            timestampString = "516079989.945584"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "59"
-            endingLineNumber = "59"
-            landmarkName = "-start"
+            startingLineNumber = "155"
+            endingLineNumber = "155"
+            landmarkName = "-loadTasks"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

+ 6 - 26
RA Image/RA Image/AppDelegate.m

@@ -44,7 +44,6 @@
     self.companyName = nil;
     self.companyIcon = nil;
     self.modeList = nil;
-    [self saveUploadTasks];
     [[NSNotificationCenter defaultCenter] postNotificationName:LogoutNotification object:nil];
     
     [self showLoginVC];
@@ -85,13 +84,13 @@
 
 void UncaughtExceptionHandler(NSException *exception) {
     AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
-    if (!appDelegate.user) {
-        return;
-    }
+//    if (!appDelegate.user) {
+//        return;
+//    }
     
-    if (appDelegate.uploadManager.arr_queue.count) {
+//    if (appDelegate.uploadManager.arr_queue.count) {
         [appDelegate saveUploadTasks];
-    }
+//    }
 }
 
 - (void)setUpUncaughtExceptionHandler {
@@ -106,13 +105,6 @@ void UncaughtExceptionHandler(NSException *exception) {
         if(self.uploadManager.arr_queue!=nil)
         {
             
-//            NSMutableArray *tmpArr = [NSMutableArray array];
-//            for (NSDictionary *dic in self.uploadManager.arr_queue) {
-//                NSMutableDictionary *mutDic = [dic mutableCopy];
-//                [mutDic removeObjectForKey:@"operation"];
-//                [mutDic removeObjectForKey:@"status"];
-//                [tmpArr addObject:mutDic];
-//            }
             [self.uploadManager stopAllTasks];
             [self.uploadManager saveTasks];
 
@@ -120,19 +112,7 @@ void UncaughtExceptionHandler(NSException *exception) {
         }
         return;
     }
-    NSString *path = [[RAUtils appCacheDirectory] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@_uploadTasks",self.user]];
-    NSMutableArray *tmpArr = [NSMutableArray array];
-    for (NSDictionary *dic in self.uploadManager.arr_queue) {
-        NSMutableDictionary *mutDic = [dic mutableCopy];
-        [mutDic removeObjectForKey:@"operation"];
-        [mutDic removeObjectForKey:@"status"];
-        [tmpArr addObject:mutDic];
-    }
-    BOOL success = [tmpArr writeToFile:path atomically:NO];
-    [self.uploadManager.arr_queue removeAllObjects];
-    if (success) {
-        DebugLog(@"Save Task Success");
-    }
+
 }
 
 - (NSMutableArray *)cachedUploadTasks {

+ 2 - 2
RA Image/RA Image/Mode.storyboard

@@ -752,11 +752,11 @@
                                         <rect key="frame" x="0.0" y="28" width="667" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Scm-6H-13W" id="WlG-lg-3va">
-                                            <rect key="frame" x="0.0" y="0.0" width="667" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="667" height="44"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="Manufacturer" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="NYL-AQ-1Xx">
-                                                    <rect key="frame" x="0.0" y="0.0" width="568" height="43.5"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="667" height="43.5"/>
                                                     <nil key="textColor"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="15"/>
                                                     <textInputTraits key="textInputTraits"/>

+ 2 - 2
RA Image/RA Image/ModelModeViewController.m

@@ -142,8 +142,8 @@
     
     [self clear];
     
-    UploadViewController *upVC = (UploadViewController *)[self viewControllerInStoryboard:@"Upload" withId:@"UploadViewController"];
-    [self.navigationController pushViewController:upVC animated:YES];
+//    UploadViewController *upVC = (UploadViewController *)[self viewControllerInStoryboard:@"Upload" withId:@"UploadViewController"];
+//    [self.navigationController pushViewController:upVC animated:YES];
 }
 - (IBAction)typeBtnClick:(UIButton *)sender {
     [self showBarcodeInput];

+ 0 - 5
RA Image/RA Image/PopModeViewController.m

@@ -106,11 +106,6 @@
     
  //    // add upload tasks;
     [Appdelegate.uploadManager addTasks:tasks];
-    
-//    NSMutableArray *arr = [NSMutableArray array];
-//    id foo = nil;
-//    [arr addObject:foo];
-//    return;
 
     [self clear];