Skip to content

Commit

Permalink
Fix the bug that the thumbnail column number is incorrect after jumpi…
Browse files Browse the repository at this point in the history
…ng to the details page

修复详情页跳页后缩略图列数错误的bug
  • Loading branch information
jiangtian616 committed Jan 15, 2024
1 parent 5fbcef4 commit ff59c20
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 2 additions & 0 deletions changelog/v7.4.11+150.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- 修复手动重新下载的状态bug
- 修复瀑布流布局下图片周围存在空白区域的bug
- 修复在未选择显示标签的画廊列表布局时,详情页画廊语言展示错误的bug
- 修复详情页跳页后缩略图列数错误的bug
- 升级数据库组件、网络组件、缓存组件、cookie组件

------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -50,4 +51,5 @@
- Fix the bug that there is a blank area around the image in the waterfall layout
- Fix the bug that the gallery language is displayed incorrectly on the details page when the gallery list layout
that does not select to display tags
- Fix the bug that the thumbnail column number is incorrect after jumping to the details page
- Upgrade database component, network component, cache component, cookie component
1 change: 0 additions & 1 deletion lib/src/pages/details/details_page_logic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import 'package:jhentai/src/model/gallery_thumbnail.dart';
import 'package:jhentai/src/model/read_page_info.dart';
import 'package:jhentai/src/network/eh_request.dart';
import 'package:jhentai/src/pages/download/download_base_page.dart';
import 'package:jhentai/src/service/local_gallery_service.dart';
import 'package:jhentai/src/service/super_resolution_service.dart';
import 'package:jhentai/src/setting/download_setting.dart';
import 'package:jhentai/src/setting/my_tags_setting.dart';
Expand Down
20 changes: 14 additions & 6 deletions lib/src/pages/details/thumbnails/thumbnails_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import '../../../config/ui_config.dart';
import '../../../mixin/scroll_to_top_logic_mixin.dart';
import '../../../mixin/scroll_to_top_state_mixin.dart';
import '../../../model/gallery_image.dart';
import '../../../setting/style_setting.dart';
import '../../../widget/eh_thumbnail.dart';
import '../../../widget/eh_wheel_speed_controller.dart';
import '../../../widget/loading_state_indicator.dart';
Expand Down Expand Up @@ -124,12 +125,19 @@ class ThumbnailsPage extends StatelessWidget with Scroll2TopPageMixin {
},
childCount: state.thumbnails.length,
),
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
mainAxisExtent: UIConfig.detailsPageThumbnailHeight,
maxCrossAxisExtent: UIConfig.detailsPageThumbnailWidth,
mainAxisSpacing: 20,
crossAxisSpacing: 5,
),
gridDelegate: StyleSetting.crossAxisCountInDetailPage.value == null
? const SliverGridDelegateWithMaxCrossAxisExtent(
mainAxisExtent: UIConfig.detailsPageThumbnailHeight,
maxCrossAxisExtent: UIConfig.detailsPageThumbnailWidth,
mainAxisSpacing: 20,
crossAxisSpacing: 5,
)
: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: StyleSetting.crossAxisCountInDetailPage.value!,
mainAxisSpacing: 20,
crossAxisSpacing: 5,
childAspectRatio: UIConfig.detailsPageGridViewCardAspectRatio,
),
);
},
),
Expand Down

0 comments on commit ff59c20

Please sign in to comment.