From 834764f81a2d65265147a16701f736a108953fd5 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Thu, 23 Mar 2023 16:26:55 +0800 Subject: [PATCH] iOS: format code --- doric-iOS/Pod/Classes/Shader/DoricListNode.m | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doric-iOS/Pod/Classes/Shader/DoricListNode.m b/doric-iOS/Pod/Classes/Shader/DoricListNode.m index 1207c762..a6fd328e 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricListNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricListNode.m @@ -225,38 +225,38 @@ - (void)blend:(NSDictionary *)props { if (self.needReload) { dispatch_async(dispatch_get_main_queue(), ^{ self.rowCount = self.itemCount + (self.loadMore ? 1 : 0); - if (self.itemViewIds.count != 0 && self.itemCount > oldItemCount && oldItemCount > 0){ + if (self.itemViewIds.count != 0 && self.itemCount > oldItemCount && oldItemCount > 0) { NSMutableArray *indexPaths = [[NSMutableArray alloc] init]; for (NSUInteger l = oldItemCount; l < self.itemCount; l++) { NSIndexPath *p = [NSIndexPath indexPathForRow:l inSection:0]; [indexPaths addObject:p]; } - + if (@available(iOS 11.0, *)) { [self.view performBatchUpdates:^{ @try { - if (oldLoadMore != self.loadMore){ + if (oldLoadMore != self.loadMore) { if (self.loadMore) { [self.view insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationNone]; [self.view insertRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:self.itemCount inSection:0]] withRowAnimation:UITableViewRowAnimationNone]; - }else { + } else { [self.view deleteRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:oldItemCount inSection:0]] withRowAnimation:UITableViewRowAnimationNone]; [self.view insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationNone]; } - }else { + } else { [self.view insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationNone]; } } @catch (NSException *exception) { [self.view reloadData]; } - } completion:nil]; + } completion:nil]; } else { [self.view reloadData]; } - }else { + } else { [self.view reloadData]; } - + if (self.view.height == 0 && self.view.doricLayout.heightSpec == DoricLayoutFit) { DoricSuperNode *node = self.superNode; while (node.superNode != nil) {