diff --git a/changelog/v1.4.5+515.md b/changelog/v1.4.6+516.md similarity index 100% rename from changelog/v1.4.5+515.md rename to changelog/v1.4.6+516.md diff --git a/lib/pages/gallery/view/comment_page.dart b/lib/pages/gallery/view/comment_page.dart index eca66f010..c59f099e9 100644 --- a/lib/pages/gallery/view/comment_page.dart +++ b/lib/pages/gallery/view/comment_page.dart @@ -85,8 +85,9 @@ class _CommentPageState extends State final comment = controller.comments?[index]; if (comment != null && - (int.tryParse(comment.score) ?? 0) > - _ehSettingService.scoreFilteringThreshold) { + (comment.score.isEmpty || + (int.tryParse(comment.score) ?? 0) > + _ehSettingService.scoreFilteringThreshold)) { return CommentItem( galleryComment: comment, ).autoCompressKeyboard(context); diff --git a/lib/pages/gallery/view/gallery_widget.dart b/lib/pages/gallery/view/gallery_widget.dart index 8d0fa7b9f..8e3011ae8 100644 --- a/lib/pages/gallery/view/gallery_widget.dart +++ b/lib/pages/gallery/view/gallery_widget.dart @@ -342,11 +342,19 @@ class TopCommentEx extends StatelessWidget { final List? comments; final int max; + EhSettingService get _ehSettingService => Get.find(); + @override Widget build(BuildContext context) { // 显示最前面两条 List _topComment(List? comments, {int max = 2}) { - final Iterable _comments = comments?.take(max) ?? []; + final Iterable _comments = comments + ?.where((comment) => + comment.score.isEmpty || + (int.tryParse(comment.score) ?? 0) > + _ehSettingService.scoreFilteringThreshold) + .take(max) ?? + []; return _comments .map((GalleryComment comment) => CommentItem( galleryComment: comment, diff --git a/pubspec.yaml b/pubspec.yaml index 4718915a6..5d94dc362 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: fehviewer description: An unofficial e-hentai app publish_to: 'none' -version: 1.4.5+515 +version: 1.4.6+516 environment: sdk: '>=3.0.0 <4.0.0'