|
|
@@ -123,10 +123,10 @@
|
|
|
UploadCell * cell= [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
|
|
|
|
|
|
NSDictionary * item_json = Appdelegate.uploadManager.arr_queue[indexPath.row];
|
|
|
-
|
|
|
- if (cell.operation) {
|
|
|
- cell.operation.updateUI = nil;
|
|
|
- }
|
|
|
+//
|
|
|
+// if (cell.operation) {
|
|
|
+// cell.operation.updateUI = nil;
|
|
|
+// }
|
|
|
|
|
|
NSString* status =nil;
|
|
|
switch ([item_json[@"status"] intValue]) {
|
|
|
@@ -161,15 +161,15 @@
|
|
|
|
|
|
RAUploadOperation* op = item_json[@"operation"];
|
|
|
|
|
|
- __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;
|
|
|
op.updateUI=^(){
|
|
|
|
|
|
|
|
|
- blockDebugLog(@"updateUI @ row%ld %p \n operation %p",idx,block_cell,block_op);
|
|
|
+// blockDebugLog(@"updateUI @ row%ld %p \n operation %p",idx,block_cell,block_op);
|
|
|
|
|
|
NSString* status =nil;
|
|
|
switch ([item_json[@"status"] intValue]) {
|
|
|
@@ -200,6 +200,7 @@
|
|
|
cell.errorMsg = item_json[@"msg"];
|
|
|
|
|
|
};
|
|
|
+ DebugLog(@"%@ set update ui",item_json[@"file"]);
|
|
|
cell.operation = op;
|
|
|
//
|
|
|
return cell;
|
|
|
@@ -311,21 +312,21 @@
|
|
|
//
|
|
|
//}
|
|
|
//
|
|
|
-//- (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;
|
|
|
+ upCell.progress = 0;
|
|
|
+ upCell.state = nil;
|
|
|
+ upCell.errorMsg = nil;
|
|
|
+ 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;
|
|
|
// }
|
|
|
-//
|
|
|
-//}
|
|
|
+
|
|
|
+}
|
|
|
/*
|
|
|
#pragma mark - UploadManager Delegate
|
|
|
|