Skip to content

Commit

Permalink
Comment view: Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
xfangfang committed Feb 21, 2025
1 parent 8c31b11 commit 7a7f626
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wiliwili/source/fragment/player_single_comment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ class DataSourceSingleCommentList : public RecyclingGridDataSource, public Comme
view->likeClickEvent.subscribe([this, item, index](size_t action) {
auto& itemData = dataList[index];
// 点赞/取消点赞 或 点踩/取消点踩
bool isLike = action == 1 || (action == 0 & itemData.action == 1);

// 是点赞相关的操作,当前状态为点赞,或者取消点赞
bool isLike = action == 1 || (action == 0 && itemData.action == 1);

if (action == 1) {
// 最新状态变为点赞,点赞数 +1
itemData.like++;
Expand Down

0 comments on commit 7a7f626

Please # to comment.