Skip to content

Commit

Permalink
Fix the bug that cannot vote or add comments in some scenarios
Browse files Browse the repository at this point in the history
修复部分场景下无法投票评论、新增评论的bug
  • Loading branch information
jiangtian616 committed Mar 11, 2024
1 parent 040ffa1 commit 336a392
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 50 deletions.
43 changes: 43 additions & 0 deletions changelog/v7.4.13+176.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
- 支持隐藏快速回顶按钮
- 支持标记出已过期的画廊种子
- 现在画廊图片加载失败时,会自动尝试重新解析其他节点
- 优化标签评分的状态更新逻辑
- 优化详情页标题
- 优化部分网络错误的提示文案
- 优化日志页的显示
- 优化标签搜索
- 优化历史记录读取性能
- 优化下载页列表布局的性能,支持取消列表动画
- 下载时优先使用列表页的标题
- 修复评分画廊后UI状态未更新的bug
- 修复详情页刷新时的UI bug
- 修复部分场景下删除本地画廊时的bug
- 修复无法删除超分图片的bug
- 修复部分情况下无法超分图片的bug
- 修复在关闭标签搜索继承时点击tag搜索时的路由bug
- 修复下载页列表布局下暂停时进度条颜色显示不正确的bug
- 修复部分情况下509识别错误的bug
- 修复瀑布流布局下,历史页面无法删除单条历史记录的bug

------------------------------------------------------------------------------------------

- Support hiding the quick back to top FAB
- Support marking outdated gallery torrents
- Now when the gallery image fails to load, it will automatically try to reparse other nodes
- Optimize the status update logic of tag rating
- Optimize gallery title in details page
- Optimized some network error information
- Optimize the display of log page
- Optimize tag search
- Optimize history record reading performance
- Optimize the performance of the download page list layout, support disable list animation
- Use gallery title in list page for download
- Fix the bug that the status is not updated after rating
- Fix UI bug when refreshing the details page
- Fix the bug of deleting local gallery in some scenarios
- Fix the bug that super-resolution images cannot be deleted
- Fix the bug that super-resolution images cannot be generated in some cases
- Fix the routing bug when clicking tag search when closing tag search inheritance
- Fix the bug that the progress bar color is displayed incorrectly when pausing in the download page list layout
- Fix the bug of 509 recognition error in some cases
- Fix the bug that the history page cannot delete a single history record in the waterfall flow layout
42 changes: 2 additions & 40 deletions changelog/v7.4.13.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,5 @@
- 支持隐藏快速回顶按钮
- 支持标记出已过期的画廊种子
- 现在画廊图片加载失败时,会自动尝试重新解析其他节点
- 优化标签评分的状态更新逻辑
- 优化详情页标题
- 优化部分网络错误的提示文案
- 优化日志页的显示
- 优化标签搜索
- 优化历史记录读取性能
- 优化下载页列表布局的性能,支持取消列表动画
- 下载时优先使用列表页的标题
- 修复评分画廊后UI状态未更新的bug
- 修复详情页刷新时的UI bug
- 修复部分场景下删除本地画廊时的bug
- 修复无法删除超分图片的bug
- 修复部分情况下无法超分图片的bug
- 修复在关闭标签搜索继承时点击tag搜索时的路由bug
- 修复下载页列表布局下暂停时进度条颜色显示不正确的bug
- 修复部分情况下509识别错误的bug
- 修复瀑布流布局下,历史页面无法删除单条历史记录的bug
- 修复部分场景下无法投票评论、新增评论的bug

------------------------------------------------------------------------------------------

- Support hiding the quick back to top FAB
- Support marking outdated gallery torrents
- Now when the gallery image fails to load, it will automatically try to reparse other nodes
- Optimize the status update logic of tag rating
- Optimize gallery title in details page
- Optimized some network error information
- Optimize the display of log page
- Optimize tag search
- Optimize history record reading performance
- Optimize the performance of the download page list layout, support disable list animation
- Use gallery title in list page for download
- Fix the bug that the status is not updated after rating
- Fix UI bug when refreshing the details page
- Fix the bug of deleting local gallery in some scenarios
- Fix the bug that super-resolution images cannot be deleted
- Fix the bug that super-resolution images cannot be generated in some cases
- Fix the routing bug when clicking tag search when closing tag search inheritance
- Fix the bug that the progress bar color is displayed incorrectly when pausing in the download page list layout
- Fix the bug of 509 recognition error in some cases
- Fix the bug that the history page cannot delete a single history record in the waterfall flow layout
- Fix the bug that cannot vote or add comments in some scenarios
4 changes: 2 additions & 2 deletions lib/src/pages/details/comment/comment_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class _CommentPageState extends State<CommentPage> with LoginRequiredMixin {
}

List<GalleryComment> newComments = await EHRequest.requestDetailPage(
galleryUrl: DetailsPageLogic.current!.state.gallery!.galleryUrl.url,
galleryUrl: DetailsPageLogic.current!.state.galleryDetails?.galleryUrl.url ?? DetailsPageLogic.current!.state.gallery!.galleryUrl.url,
parser: EHSpiderParser.detailPage2Comments,
useCacheIfAvailable: false,
);
Expand Down Expand Up @@ -113,7 +113,7 @@ class _CommentPageState extends State<CommentPage> with LoginRequiredMixin {
}

List<GalleryComment> newComments = await EHRequest.requestDetailPage(
galleryUrl: DetailsPageLogic.current!.state.gallery!.galleryUrl.url,
galleryUrl: DetailsPageLogic.current!.state.galleryDetails?.galleryUrl.url ?? DetailsPageLogic.current!.state.gallery!.galleryUrl.url,
parser: EHSpiderParser.detailPage2Comments,
useCacheIfAvailable: false,
);
Expand Down
4 changes: 2 additions & 2 deletions lib/src/pages/details/comment/eh_comment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,8 @@ class _EHCommentFooterState extends State<_EHCommentFooter> with LoginRequiredMi

try {
newScore = await EHRequest.voteComment(
detailsPageState.gallery!.gid,
detailsPageState.gallery!.token,
detailsPageState.galleryDetails?.galleryUrl.gid ?? detailsPageState.gallery!.gid,
detailsPageState.galleryDetails?.galleryUrl.token ?? detailsPageState.gallery!.token,
UserSetting.ipbMemberId.value!,
detailsPageState.apikey!,
widget.commentId,
Expand Down
1 change: 0 additions & 1 deletion lib/src/pages/details/details_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import '../../database/database.dart';
import '../../mixin/scroll_to_top_logic_mixin.dart';
import '../../mixin/scroll_to_top_state_mixin.dart';
import '../../service/gallery_download_service.dart';
import '../../service/local_gallery_service.dart';
import '../../setting/preference_setting.dart';
import '../../setting/style_setting.dart';
import '../../utils/date_util.dart';
Expand Down
12 changes: 10 additions & 2 deletions lib/src/pages/details/thumbnails/thumbnails_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ class ThumbnailsPage extends StatelessWidget with Scroll2TopPageMixin {

ThumbnailsPage({Key? key}) : super(key: key);

String get _mainTitleText =>
logic.detailsPageState.gallery?.title ??
logic.detailsPageState.galleryDetails?.japaneseTitle ??
logic.detailsPageState.galleryDetails?.rawTitle ??
logic.detailsPageState.galleryMetadata?.japaneseTitle ??
logic.detailsPageState.galleryMetadata?.title ??
'';

@override
Widget build(BuildContext context) {
return GetBuilder<ThumbnailsPageLogic>(
Expand All @@ -44,7 +52,7 @@ class ThumbnailsPage extends StatelessWidget with Scroll2TopPageMixin {

AppBar buildAppBar() {
return AppBar(
title: Text(logic.detailsPageState.gallery?.title ?? '', style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold)),
title: Text(_mainTitleText, style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold)),
actions: [
IconButton(
icon: const Icon(FontAwesomeIcons.paperPlane, size: 21),
Expand Down Expand Up @@ -84,7 +92,7 @@ class ThumbnailsPage extends StatelessWidget with Scroll2TopPageMixin {
SchedulerBinding.instance.addPostFrameCallback((_) => logic.loadMoreThumbnails());
}

GalleryImage? downloadedImage = logic.detailsPageLogic.galleryDownloadService.galleryDownloadInfos[logic.detailsPageState.gallery!.gid]
GalleryImage? downloadedImage = logic.detailsPageLogic.galleryDownloadService.galleryDownloadInfos[logic.detailsPageState.galleryDetails!.galleryUrl.gid]
?.images[state.absoluteIndexOfThumbnails[index]];

return KeepAliveWrapper(
Expand Down
4 changes: 2 additions & 2 deletions lib/src/widget/eh_comment_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ class EHCommentDialogState extends State<EHCommentDialog> {
try {
if (widget.type == CommentDialogType.add) {
errMsg = await EHRequest.requestSendComment(
galleryUrl: DetailsPageLogic.current!.state.gallery!.galleryUrl.url,
galleryUrl: DetailsPageLogic.current!.state.galleryDetails?.galleryUrl.url ?? DetailsPageLogic.current!.state.gallery!.galleryUrl.url,
content: content,
parser: EHSpiderParser.sendComment2ErrorMsg,
);
}

if (widget.type == CommentDialogType.update) {
errMsg = await EHRequest.requestUpdateComment(
galleryUrl: DetailsPageLogic.current!.state.gallery!.galleryUrl.url,
galleryUrl: DetailsPageLogic.current!.state.galleryDetails?.galleryUrl.url ?? DetailsPageLogic.current!.state.gallery!.galleryUrl.url,
commentId: widget.commentId!,
content: content,
parser: EHSpiderParser.sendComment2ErrorMsg,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: jhentai
description: A flutter app for E-Hentai/EXHentai

publish_to: 'none'
version: 7.4.13+175
version: 7.4.13+176

environment:
sdk: '>=3.0.0 <4.0.0'
Expand Down

0 comments on commit 336a392

Please sign in to comment.