Эх сурвалжийг харах

RA Image
1 修复登陆界面版本号显示。
2 更改文件命名方式。
3 新增切换到上传队列列表后保持屏幕常亮功能。

Ray Zhang 9 жил өмнө
parent
commit
4485cd02d9

BIN
Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


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


+ 1 - 0
RA Image/RA Image/AppDelegate.h

@@ -16,6 +16,7 @@
 @property (strong,nonatomic) NSString* user;
 @property (strong,nonatomic) NSString * password;
 @property (strong,nonatomic) NSString* build;
+@property (strong,nonatomic) NSString* shortver;
 @property bool bLogin;
 @property (nonatomic,copy) NSString *address;
 @property (nonatomic,copy) NSString *companyName;

+ 1 - 0
RA Image/RA Image/AppDelegate.m

@@ -154,6 +154,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     
     NSDictionary* infoDict =[[NSBundle mainBundle] infoDictionary];
     self.build =[infoDict objectForKey:@"CFBundleVersion"];
+    self.shortver=[infoDict objectForKey:@"CFBundleShortVersionString"];
     self.rootVC = self.window.rootViewController;
     
 //    self.uploadManager.maxRetry = 2;

+ 4 - 3
RA Image/RA Image/BasicModeViewController.m

@@ -110,7 +110,8 @@
 
 - (void)showPhotoList {
     if (!self.photos.count) {
-        [RAUtils message_alert:@"There is no photo" title:@"Note" controller:self];
+//        [RAUtils message_alert:@"There is no photo" title:@"Note" controller:self];
+        [self showCamera];
         return;
     }
     PhotoListViewController *photoListVC = (PhotoListViewController *)[self viewControllerInStoryboard:@"PhotoList" withId:@"PhotoListViewController"];
@@ -282,9 +283,9 @@
     
     NSDate * date = [NSDate date];
     NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init];
-    [dateFormatter setDateFormat:@"YYYY-MM-dd-HH-mm-ss"];
+    [dateFormatter setDateFormat:@"YYYYMMddHHmmss"];
     NSString * name = [[dateFormatter stringFromDate:date] stringByAppendingPathExtension:@"png"];
-
+    name=[self.barcodeTitle stringByAppendingString:name];
 //    NSString *name = [[NSUUID UUID] UUIDString];
 //    name = [name stringByAppendingPathExtension:@"png"];
     NSString *path = [dir stringByAppendingPathComponent:name];

+ 2 - 1
RA Image/RA Image/LoginViewController.m

@@ -43,8 +43,9 @@ static NSString *kLoginUserInfo = @"UserInfo";
     self.loginBtn.clipsToBounds = YES;
     
     NSDictionary* infoDict =[[NSBundle mainBundle] infoDictionary];
+    NSString* build =[infoDict objectForKey:@"CFBundleVersion"];
     NSString* short_version =[infoDict objectForKey:@"CFBundleShortVersionString"];
-    self.versionLabel.text = [NSString stringWithFormat:@"V%@",short_version];
+    self.versionLabel.text = [NSString stringWithFormat:@"Ver: %@.%@",short_version,build];
 }
 
 

+ 2 - 0
RA Image/RA Image/UploadViewController.m

@@ -19,6 +19,7 @@
 
 - (void)viewDidLoad {
     [super viewDidLoad];
+    [ [ UIApplication sharedApplication] setIdleTimerDisabled:YES ] ;
     // Do any additional setup after loading the view.
     [self.view insertSubview:[UIView new] atIndex:0];
     
@@ -74,6 +75,7 @@
 }
 -(void) dealloc
 {
+    [ [ UIApplication sharedApplication] setIdleTimerDisabled:NO ] ;
     AppDelegate* appdelegate=(AppDelegate*)[UIApplication sharedApplication].delegate;
     [appdelegate.uploadManager removeObserver:self forKeyPath:@"arr_queue"];
 }

+ 6 - 3
common/upload/RAUploadManager.m

@@ -207,7 +207,9 @@
         
         [self stopTask:task];
         NSError* error = nil;
-        [fmanager removeItemAtPath:[self filePath:task] error:&error];
+        bool bdel=[fmanager removeItemAtPath:[self filePath:task] error:&error];
+        if(!bdel)
+            DebugLog(@"file delete failed path:%@",[self filePath:task]);
     }
     
     
@@ -250,8 +252,9 @@
     //    [self.arr_queue addObject:task];
     [self stopTask:task];
     NSError* error = nil;
-    [fmanager removeItemAtPath:[self filePath:task] error:&error];
-    
+    bool bdel=[fmanager removeItemAtPath:[self filePath:task] error:&error];
+    if(!bdel)
+        DebugLog(@"file delete failed path:%@",[self filePath:task]);
     
 
 //    [self.arr_queue_lock lock];