fix inconsistency due to itemcount change

This commit is contained in:
王劲鹏 2021-03-19 10:12:14 +08:00 committed by osborn
parent 774cacc0fc
commit eba0261082

View File

@ -228,7 +228,12 @@ - (void)blendSubNode:(NSDictionary *)subModel {
return; return;
} }
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:[key integerValue] inSection:0]; NSIndexPath *indexPath = [NSIndexPath indexPathForRow:[key integerValue] inSection:0];
[self.view reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone]; @try {
[self.view reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
}
@catch(id exception) {
[self.doricContext.driver.registry onException:exception inContext:self.doricContext];
}
}]; }];
} }
}]; }];
@ -252,7 +257,12 @@ - (void)callItem:(NSUInteger)position height:(CGFloat)height {
return; return;
} }
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:position inSection:0]; NSIndexPath *indexPath = [NSIndexPath indexPathForRow:position inSection:0];
[self.view reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone]; @try {
[self.view reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
}
@catch(id exception) {
[self.doricContext.driver.registry onException:exception inContext:self.doricContext];
}
}]; }];
}); });
} else { } else {