iOS: fix when clear list's data, do not call loadMore again
This commit is contained in:
parent
349e56539c
commit
12234d3035
@ -226,6 +226,7 @@ - (void)blendView:(UICollectionView *)view forPropName:(NSString *)name propValu
|
|||||||
} else if ([@"renderItem" isEqualToString:name]) {
|
} else if ([@"renderItem" isEqualToString:name]) {
|
||||||
if ([self.renderItemFuncId isEqualToString:prop]) {
|
if ([self.renderItemFuncId isEqualToString:prop]) {
|
||||||
} else {
|
} else {
|
||||||
|
self.loadAnchor = -1;
|
||||||
[self.itemViewIds removeAllObjects];
|
[self.itemViewIds removeAllObjects];
|
||||||
[self clearSubModel];
|
[self clearSubModel];
|
||||||
[self.view reloadData];
|
[self.view reloadData];
|
||||||
|
@ -54,7 +54,7 @@ @interface DoricListNode () <UITableViewDataSource, UITableViewDelegate>
|
|||||||
@property(nonatomic, copy) NSString *renderItemFuncId;
|
@property(nonatomic, copy) NSString *renderItemFuncId;
|
||||||
@property(nonatomic, copy) NSString *loadMoreViewId;
|
@property(nonatomic, copy) NSString *loadMoreViewId;
|
||||||
@property(nonatomic, assign) BOOL loadMore;
|
@property(nonatomic, assign) BOOL loadMore;
|
||||||
@property(nonatomic, assign) NSUInteger loadAnchor;
|
@property(nonatomic, assign) NSInteger loadAnchor;
|
||||||
@property(nonatomic, strong) NSMutableSet <DoricDidScrollBlock> *didScrollBlocks;
|
@property(nonatomic, strong) NSMutableSet <DoricDidScrollBlock> *didScrollBlocks;
|
||||||
@property(nonatomic, copy) NSString *onScrollFuncId;
|
@property(nonatomic, copy) NSString *onScrollFuncId;
|
||||||
@property(nonatomic, copy) NSString *onScrollEndFuncId;
|
@property(nonatomic, copy) NSString *onScrollEndFuncId;
|
||||||
@ -68,6 +68,7 @@ - (instancetype)initWithContext:(DoricContext *)doricContext {
|
|||||||
_itemHeights = [NSMutableDictionary new];
|
_itemHeights = [NSMutableDictionary new];
|
||||||
_itemActions = [NSMutableDictionary new];
|
_itemActions = [NSMutableDictionary new];
|
||||||
_batchCount = 15;
|
_batchCount = 15;
|
||||||
|
_loadAnchor = -1;
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
@ -103,6 +104,7 @@ - (void)blendView:(UITableView *)view forPropName:(NSString *)name propValue:(id
|
|||||||
[self.view reloadData];
|
[self.view reloadData];
|
||||||
} else if ([@"renderItem" isEqualToString:name]) {
|
} else if ([@"renderItem" isEqualToString:name]) {
|
||||||
if (![self.renderItemFuncId isEqualToString:prop]) {
|
if (![self.renderItemFuncId isEqualToString:prop]) {
|
||||||
|
self.loadAnchor = -1;
|
||||||
self.renderItemFuncId = prop;
|
self.renderItemFuncId = prop;
|
||||||
[self.itemViewIds.allValues forEach:^(NSString *obj) {
|
[self.itemViewIds.allValues forEach:^(NSString *obj) {
|
||||||
[self removeSubModel:obj];
|
[self removeSubModel:obj];
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user