iOS: fix in list when not combine view model cause UI have no update (#559)
This commit is contained in:
parent
44d971b870
commit
9be6bb2051
@ -399,6 +399,11 @@ - (void)blendSubNode:(NSDictionary *)subModel {
|
|||||||
NSString *viewId = subModel[@"id"];
|
NSString *viewId = subModel[@"id"];
|
||||||
DoricViewNode *viewNode = [self subNodeWithViewId:viewId];
|
DoricViewNode *viewNode = [self subNodeWithViewId:viewId];
|
||||||
BOOL skipReload = NO;
|
BOOL skipReload = NO;
|
||||||
|
|
||||||
|
NSMutableDictionary *model = [[self subModelOf:viewId] mutableCopy];
|
||||||
|
[self recursiveMixin:subModel to:model];
|
||||||
|
[self setSubModel:model in:viewId];
|
||||||
|
|
||||||
if (viewNode) {
|
if (viewNode) {
|
||||||
CGSize originSize = viewNode.view.frame.size;
|
CGSize originSize = viewNode.view.frame.size;
|
||||||
[viewNode blend:subModel[@"props"]];
|
[viewNode blend:subModel[@"props"]];
|
||||||
@ -407,11 +412,8 @@ - (void)blendSubNode:(NSDictionary *)subModel {
|
|||||||
if (CGSizeEqualToSize(originSize, viewNode.view.frame.size)) {
|
if (CGSizeEqualToSize(originSize, viewNode.view.frame.size)) {
|
||||||
skipReload = YES;
|
skipReload = YES;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
NSMutableDictionary *model = [[self subModelOf:viewId] mutableCopy];
|
|
||||||
[self recursiveMixin:subModel to:model];
|
|
||||||
[self setSubModel:model in:viewId];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skipReload) {
|
if (skipReload) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -337,6 +337,11 @@ - (void)blendSubNode:(NSDictionary *)subModel {
|
|||||||
NSString *viewId = subModel[@"id"];
|
NSString *viewId = subModel[@"id"];
|
||||||
DoricViewNode *viewNode = [self subNodeWithViewId:viewId];
|
DoricViewNode *viewNode = [self subNodeWithViewId:viewId];
|
||||||
BOOL skipReload = NO;
|
BOOL skipReload = NO;
|
||||||
|
|
||||||
|
NSMutableDictionary *model = [[self subModelOf:viewId] mutableCopy];
|
||||||
|
[self recursiveMixin:subModel to:model];
|
||||||
|
[self setSubModel:model in:viewId];
|
||||||
|
|
||||||
if (viewNode) {
|
if (viewNode) {
|
||||||
CGSize originSize = viewNode.view.frame.size;
|
CGSize originSize = viewNode.view.frame.size;
|
||||||
[viewNode blend:subModel[@"props"]];
|
[viewNode blend:subModel[@"props"]];
|
||||||
@ -345,11 +350,8 @@ - (void)blendSubNode:(NSDictionary *)subModel {
|
|||||||
if (CGSizeEqualToSize(originSize, viewNode.view.frame.size)) {
|
if (CGSizeEqualToSize(originSize, viewNode.view.frame.size)) {
|
||||||
skipReload = YES;
|
skipReload = YES;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
NSMutableDictionary *model = [[self subModelOf:viewId] mutableCopy];
|
|
||||||
[self recursiveMixin:subModel to:model];
|
|
||||||
[self setSubModel:model in:viewId];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skipReload) {
|
if (skipReload) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -381,6 +381,11 @@ - (void)blendSubNode:(NSDictionary *)subModel {
|
|||||||
NSString *viewId = subModel[@"id"];
|
NSString *viewId = subModel[@"id"];
|
||||||
DoricViewNode *viewNode = [self subNodeWithViewId:viewId];
|
DoricViewNode *viewNode = [self subNodeWithViewId:viewId];
|
||||||
BOOL skipReload = NO;
|
BOOL skipReload = NO;
|
||||||
|
|
||||||
|
NSMutableDictionary *model = [[self subModelOf:viewId] mutableCopy];
|
||||||
|
[self recursiveMixin:subModel to:model];
|
||||||
|
[self setSubModel:model in:viewId];
|
||||||
|
|
||||||
if (viewNode) {
|
if (viewNode) {
|
||||||
CGSize originSize = viewNode.view.frame.size;
|
CGSize originSize = viewNode.view.frame.size;
|
||||||
[viewNode blend:subModel[@"props"]];
|
[viewNode blend:subModel[@"props"]];
|
||||||
@ -389,11 +394,8 @@ - (void)blendSubNode:(NSDictionary *)subModel {
|
|||||||
if (CGSizeEqualToSize(originSize, viewNode.view.frame.size)) {
|
if (CGSizeEqualToSize(originSize, viewNode.view.frame.size)) {
|
||||||
skipReload = YES;
|
skipReload = YES;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
NSMutableDictionary *model = [[self subModelOf:viewId] mutableCopy];
|
|
||||||
[self recursiveMixin:subModel to:model];
|
|
||||||
[self setSubModel:model in:viewId];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skipReload) {
|
if (skipReload) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -253,6 +253,11 @@ - (void)blendSubNode:(NSDictionary *)subModel {
|
|||||||
NSString *viewId = subModel[@"id"];
|
NSString *viewId = subModel[@"id"];
|
||||||
DoricViewNode *viewNode = [self subNodeWithViewId:viewId];
|
DoricViewNode *viewNode = [self subNodeWithViewId:viewId];
|
||||||
BOOL skipReload = NO;
|
BOOL skipReload = NO;
|
||||||
|
|
||||||
|
NSMutableDictionary *model = [[self subModelOf:viewId] mutableCopy];
|
||||||
|
[self recursiveMixin:subModel to:model];
|
||||||
|
[self setSubModel:model in:viewId];
|
||||||
|
|
||||||
if (viewNode) {
|
if (viewNode) {
|
||||||
CGSize originSize = viewNode.view.frame.size;
|
CGSize originSize = viewNode.view.frame.size;
|
||||||
[viewNode blend:subModel[@"props"]];
|
[viewNode blend:subModel[@"props"]];
|
||||||
@ -261,11 +266,8 @@ - (void)blendSubNode:(NSDictionary *)subModel {
|
|||||||
if (CGSizeEqualToSize(originSize, viewNode.view.frame.size)) {
|
if (CGSizeEqualToSize(originSize, viewNode.view.frame.size)) {
|
||||||
skipReload = YES;
|
skipReload = YES;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
NSMutableDictionary *model = [[self subModelOf:viewId] mutableCopy];
|
|
||||||
[self recursiveMixin:subModel to:model];
|
|
||||||
[self setSubModel:model in:viewId];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skipReload) {
|
if (skipReload) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -83,6 +83,8 @@ - (void)recursiveMixin:(NSDictionary *)srcModel to:(NSMutableDictionary *)target
|
|||||||
}];
|
}];
|
||||||
if (viewModel) {
|
if (viewModel) {
|
||||||
[self recursiveMixin:subview to:viewModel];
|
[self recursiveMixin:subview to:viewModel];
|
||||||
|
} else {
|
||||||
|
[targetOri addObject:subview];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user