|
|
@@ -115,19 +115,29 @@
|
|
|
{
|
|
|
AppDelegate* Appdelegate=(AppDelegate*)[UIApplication sharedApplication].delegate;
|
|
|
|
|
|
- DebugLog(@"cellForRowAtIndexPath %ld",indexPath.row);
|
|
|
+
|
|
|
|
|
|
|
|
|
{
|
|
|
NSString *CellIdentifier = @"UploadCell";
|
|
|
UploadCell * cell= [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
|
|
|
|
|
|
+
|
|
|
+
|
|
|
NSDictionary * item_json = Appdelegate.uploadManager.arr_queue[indexPath.row];
|
|
|
//
|
|
|
// if (cell.operation) {
|
|
|
// cell.operation.updateUI = nil;
|
|
|
// }
|
|
|
|
|
|
+//<<<<<<< .mine
|
|
|
+// DebugLog(@"cellForRowAtIndexPath %ld %p",indexPath.row,cell);
|
|
|
+// DebugLog(@"item_json %@",item_json);
|
|
|
+ RAUploadOperation* op = item_json[@"operation"];
|
|
|
+//
|
|
|
+//
|
|
|
+//=======
|
|
|
+//>>>>>>> .r32582
|
|
|
NSString* status =nil;
|
|
|
switch ([item_json[@"status"] intValue]) {
|
|
|
case TaskStatusStart:
|
|
|
@@ -159,13 +169,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
- RAUploadOperation* op = item_json[@"operation"];
|
|
|
|
|
|
+//<<<<<<< .mine
|
|
|
+//
|
|
|
// __block RAUploadOperation* block_op = op;
|
|
|
// __block UploadCell* block_cell = cell;
|
|
|
// __block NSIndexPath* block_index = indexPath;
|
|
|
// long idx = indexPath.row;
|
|
|
// __weak typeof(self) weakself = self;
|
|
|
+//=======
|
|
|
+// __block RAUploadOperation* block_op = op;
|
|
|
+// __block UploadCell* block_cell = cell;
|
|
|
+// __block NSIndexPath* block_index = indexPath;
|
|
|
+// long idx = indexPath.row;
|
|
|
+// __weak typeof(self) weakself = self;
|
|
|
+//>>>>>>> .r32582
|
|
|
+// DebugLog(@"OPERATION %p SET UPDATEUI",op);
|
|
|
op.updateUI=^(){
|
|
|
|
|
|
|
|
|
@@ -312,6 +331,15 @@
|
|
|
//
|
|
|
//}
|
|
|
//
|
|
|
+//<<<<<<< .mine
|
|
|
+//- (void)tableView:(UITableView *)tableView didEndDisplayingCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
|
|
|
+// UploadCell *upCell = (UploadCell *)cell;
|
|
|
+//// upCell.name = nil;
|
|
|
+//// upCell.progress = 0;
|
|
|
+//// upCell.state = nil;
|
|
|
+//// upCell.errorMsg = nil;
|
|
|
+////
|
|
|
+//=======
|
|
|
- (void)tableView:(UITableView *)tableView didEndDisplayingCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
|
|
|
UploadCell *upCell = (UploadCell *)cell;
|
|
|
upCell.name = nil;
|
|
|
@@ -321,14 +349,23 @@
|
|
|
if (upCell.operation) {
|
|
|
upCell.operation.updateUI = nil;
|
|
|
}
|
|
|
-// AppDelegate* Appdelegate=(AppDelegate*)[UIApplication sharedApplication].delegate;
|
|
|
-// if (indexPath.row < Appdelegate.uploadManager.arr_queue.count) {// Clear List先调用此方法,再调用numberOfRowsInSection,所以先判断避免Crash
|
|
|
-// NSDictionary * item_json = Appdelegate.uploadManager.arr_queue[indexPath.row];
|
|
|
-// RAUploadOperation* op = item_json[@"operation"];
|
|
|
-// op.updateUI = nil;
|
|
|
+//>>>>>>> .r32582
|
|
|
+//// AppDelegate* Appdelegate=(AppDelegate*)[UIApplication sharedApplication].delegate;
|
|
|
+//// if (indexPath.row < Appdelegate.uploadManager.arr_queue.count) {// Clear List先调用此方法,再调用numberOfRowsInSection,所以先判断避免Crash
|
|
|
+//// NSDictionary * item_json = Appdelegate.uploadManager.arr_queue[indexPath.row];
|
|
|
+//// RAUploadOperation* op = item_json[@"operation"];
|
|
|
+//// op.updateUI = nil;
|
|
|
+//// }
|
|
|
+//<<<<<<< .mine
|
|
|
+// if (upCell.operation) {
|
|
|
+// upCell.operation.updateUI = nil;
|
|
|
+// DebugLog(@"OPERATION %p SET UPDATEUI",upCell.operation);
|
|
|
// }
|
|
|
+//}
|
|
|
+//=======
|
|
|
|
|
|
}
|
|
|
+//>>>>>>> .r32582
|
|
|
/*
|
|
|
#pragma mark - UploadManager Delegate
|
|
|
|