|
@@ -548,20 +548,24 @@ void UncaughtExceptionHandler(NSException *exception) {
|
|
|
// NSLog(@"urgencyDic: %@",self.urgencyDic);
|
|
// NSLog(@"urgencyDic: %@",self.urgencyDic);
|
|
|
if (self.urgencyDic.allKeys.count > 2) {
|
|
if (self.urgencyDic.allKeys.count > 2) {
|
|
|
|
|
|
|
|
|
|
+ NSDictionary *tmp_urgencyDic = [self.urgencyDic copy];// 避免恢复后再次写入
|
|
|
|
|
+ [self.urgencyDic removeAllObjects];
|
|
|
|
|
+ [self.urgencyDic setObject:[NSNumber numberWithInt:0] forKey:@"count"];
|
|
|
|
|
+
|
|
|
MainViewController *mainVC = [self.window.rootViewController.childViewControllers lastObject];
|
|
MainViewController *mainVC = [self.window.rootViewController.childViewControllers lastObject];
|
|
|
UIStoryboard *mainStoryBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
|
|
UIStoryboard *mainStoryBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
|
|
|
|
|
|
|
|
- NSString *user = [self.urgencyDic objectForKey:@"user"];
|
|
|
|
|
|
|
+ NSString *user = [tmp_urgencyDic objectForKey:@"user"];
|
|
|
if (![user isEqualToString:self.user]) {
|
|
if (![user isEqualToString:self.user]) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- BOOL offline_mode = [[self.urgencyDic objectForKey:@"offline_mode"] boolValue];
|
|
|
|
|
|
|
+ BOOL offline_mode = [[tmp_urgencyDic objectForKey:@"offline_mode"] boolValue];
|
|
|
if (!((self.offline_mode && offline_mode) || (!self.offline_mode && !offline_mode))) {
|
|
if (!((self.offline_mode && offline_mode) || (!self.offline_mode && !offline_mode))) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- id count = [self.urgencyDic objectForKey:@"count"];
|
|
|
|
|
|
|
+ id count = [tmp_urgencyDic objectForKey:@"count"];
|
|
|
int level_count = count ? [count integerValue] : 0;
|
|
int level_count = count ? [count integerValue] : 0;
|
|
|
|
|
|
|
|
if (!level_count) {
|
|
if (!level_count) {
|
|
@@ -572,7 +576,7 @@ void UncaughtExceptionHandler(NSException *exception) {
|
|
|
|
|
|
|
|
NSString *level_key = [NSString stringWithFormat:@"level_%d",i];
|
|
NSString *level_key = [NSString stringWithFormat:@"level_%d",i];
|
|
|
|
|
|
|
|
- NSDictionary *urgencyDic = [self.urgencyDic objectForKey:level_key];
|
|
|
|
|
|
|
+ NSDictionary *urgencyDic = [tmp_urgencyDic objectForKey:level_key];
|
|
|
|
|
|
|
|
NSString *className = [urgencyDic objectForKey:@"class_name"];
|
|
NSString *className = [urgencyDic objectForKey:@"class_name"];
|
|
|
|
|
|