Marino Faggiana 7 年之前
父节点
当前提交
eaab98b903
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3 4
      iOSClient/Main/CCMain.m

+ 3 - 4
iOSClient/Main/CCMain.m

@@ -4811,8 +4811,8 @@
     //store swipeOffset before relod
     [_statusSwipeCell removeAllObjects];
     for (MGSwipeTableCell *cell in self.tableView.visibleCells) {
-        NSIndexPath *path = [self.tableView indexPathForCell:cell];
-        [_statusSwipeCell setObject:[NSNumber numberWithDouble:cell.swipeOffset] forKey:[@(path.row) stringValue]];
+        NSIndexPath *indexPath = [self.tableView indexPathForCell:cell];
+        [_statusSwipeCell setObject:[NSNumber numberWithDouble:cell.swipeOffset] forKey:indexPath];
     }
     
     // reload table view
@@ -5382,9 +5382,8 @@
     [moreButton centerIconOverText];
 
     //restore swipeOffset after relod
-    CGFloat swipeOffset = [[_statusSwipeCell objectForKey:[@(indexPath.row) stringValue]] doubleValue];
+    CGFloat swipeOffset = [[_statusSwipeCell objectForKey:indexPath] doubleValue];
     if (swipeOffset < 0) {
-        //[cell setSwipeOffset:swipeOffset animated:NO completion:nil];
         [cell showSwipe:MGSwipeDirectionRightToLeft animated:NO];
     } else if (swipeOffset > 0) {
         [cell showSwipe:MGSwipeDirectionLeftToRight animated:NO];