iOS: fix listItem cannot be animated
This commit is contained in:
parent
c3093d9ff2
commit
0477e5790b
@ -293,7 +293,6 @@ - (DoricViewNode *)subNodeWithViewId:(NSString *)viewId {
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)blendSubNode:(NSDictionary *)subModel {
|
- (void)blendSubNode:(NSDictionary *)subModel {
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
|
||||||
NSString *viewId = subModel[@"id"];
|
NSString *viewId = subModel[@"id"];
|
||||||
DoricViewNode *viewNode = [self subNodeWithViewId:viewId];
|
DoricViewNode *viewNode = [self subNodeWithViewId:viewId];
|
||||||
BOOL skipReload = NO;
|
BOOL skipReload = NO;
|
||||||
@ -313,6 +312,7 @@ - (void)blendSubNode:(NSDictionary *)subModel {
|
|||||||
if (skipReload) {
|
if (skipReload) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[self.itemViewIds enumerateKeysAndObjectsUsingBlock:^(NSNumber *_Nonnull key, NSString *_Nonnull obj, BOOL *_Nonnull stop) {
|
[self.itemViewIds enumerateKeysAndObjectsUsingBlock:^(NSNumber *_Nonnull key, NSString *_Nonnull obj, BOOL *_Nonnull stop) {
|
||||||
if ([viewId isEqualToString:obj]) {
|
if ([viewId isEqualToString:obj]) {
|
||||||
*stop = YES;
|
*stop = YES;
|
||||||
|
@ -280,7 +280,6 @@ - (NSDictionary *)itemModelAt:(NSUInteger)position {
|
|||||||
- (void)blendSubNode:(NSDictionary *)subModel {
|
- (void)blendSubNode:(NSDictionary *)subModel {
|
||||||
///Here async blend sub node because the item count need to be applied first.
|
///Here async blend sub node because the item count need to be applied first.
|
||||||
NSUInteger currentCount = self.itemCount + (self.loadMore ? 1 : 0);
|
NSUInteger currentCount = self.itemCount + (self.loadMore ? 1 : 0);
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
|
||||||
NSString *viewId = subModel[@"id"];
|
NSString *viewId = subModel[@"id"];
|
||||||
DoricViewNode *viewNode = [self subNodeWithViewId:viewId];
|
DoricViewNode *viewNode = [self subNodeWithViewId:viewId];
|
||||||
BOOL skipReload = NO;
|
BOOL skipReload = NO;
|
||||||
@ -300,6 +299,7 @@ - (void)blendSubNode:(NSDictionary *)subModel {
|
|||||||
if (skipReload) {
|
if (skipReload) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[self.itemViewIds enumerateKeysAndObjectsUsingBlock:^(NSNumber *_Nonnull key, NSString *_Nonnull obj, BOOL *_Nonnull stop) {
|
[self.itemViewIds enumerateKeysAndObjectsUsingBlock:^(NSNumber *_Nonnull key, NSString *_Nonnull obj, BOOL *_Nonnull stop) {
|
||||||
if ([viewId isEqualToString:obj]) {
|
if ([viewId isEqualToString:obj]) {
|
||||||
*stop = YES;
|
*stop = YES;
|
||||||
|
Reference in New Issue
Block a user