Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

Commit

Permalink
fix: filter reply
Browse files Browse the repository at this point in the history
Signed-off-by: bggRGjQaUbCoE <[email protected]>
  • Loading branch information
bggRGjQaUbCoE committed Jan 8, 2025
1 parent 4d35dfe commit 5982fd3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
31 changes: 16 additions & 15 deletions lib/http/reply.dart
Original file line number Diff line number Diff line change
Expand Up @@ -109,22 +109,23 @@ class ReplyHttp {
.hasMatch(mainListReply.upTop.content.message)) {
mainListReply.clearUpTop();
}
}
// replies
if (mainListReply.replies.isNotEmpty) {
mainListReply.replies.removeWhere((item) {
bool hasMatch = RegExp(banWordForReply, caseSensitive: false)
.hasMatch(item.content.message);
// remove subreplies
if (hasMatch.not) {
if (item.replies.isNotEmpty) {
item.replies.removeWhere((item) =>
RegExp(banWordForReply, caseSensitive: false)
.hasMatch(item.content.message));

// replies
if (mainListReply.replies.isNotEmpty) {
mainListReply.replies.removeWhere((item) {
bool hasMatch = RegExp(banWordForReply, caseSensitive: false)
.hasMatch(item.content.message);
// remove subreplies
if (hasMatch.not) {
if (item.replies.isNotEmpty) {
item.replies.removeWhere((item) =>
RegExp(banWordForReply, caseSensitive: false)
.hasMatch(item.content.message));
}
}
}
return hasMatch;
});
return hasMatch;
});
}
}
return LoadingState.success(mainListReply);
} else {
Expand Down
1 change: 0 additions & 1 deletion lib/http/video.dart
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ class VideoHttp {
'bili-http-engine': 'cronet',
}),
);
Utils.showCopyTextDialog(jsonEncode(res.data));
if (res.data['code'] == 0) {
List<RecVideoItemAppModel> list = [];
List<int> blackMidsList = GStorage.blackMidsList;
Expand Down

0 comments on commit 5982fd3

Please sign in to comment.