动态分享举报点击查看图片
This commit is contained in:
@@ -134,7 +134,7 @@
|
||||
}
|
||||
#pragma mark - XPMonentsTableViewCellDelegate
|
||||
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClickLike:(MonentsInfoModel *)monentsInfo {
|
||||
[self.presenter likeMonent:monentsInfo.dynamicId status:!monentsInfo.like likedUid:monentsInfo.uid worldId:[NSString stringWithFormat:@"%ld", monentsInfo.worldId]];
|
||||
[self.presenter likeMonent:monentsInfo.dynamicId status:!monentsInfo.isLike likedUid:monentsInfo.uid worldId:[NSString stringWithFormat:@"%ld", monentsInfo.worldId]];
|
||||
}
|
||||
|
||||
#pragma mark -JXCategoryListContainerViewDelegate
|
||||
@@ -177,11 +177,14 @@
|
||||
- (void)likeMonentsSuccess:(NSString *)dynamicId status:(BOOL)status {
|
||||
[self.datasource enumerateObjectsUsingBlock:^(MonentsInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if ([obj.dynamicId isEqualToString:dynamicId]) {
|
||||
NSInteger count = obj.likeCount.integerValue;
|
||||
obj.isLike = status;
|
||||
if (status) {
|
||||
obj.like += 1;
|
||||
count += 1;
|
||||
} else {
|
||||
obj.like -= 1;
|
||||
count -= 1;
|
||||
}
|
||||
obj.likeCount = [NSString stringWithFormat:@"%ld", count];
|
||||
*stop = YES;
|
||||
}
|
||||
}];
|
||||
|
Reference in New Issue
Block a user