From 59d3471f0ce46da209e773cb3c24470bdc1ff8e1 Mon Sep 17 00:00:00 2001 From: honjow Date: Fri, 22 Oct 2021 13:58:27 +0800 Subject: [PATCH] =?UTF-8?q?Feat:=20=E7=80=91=E5=B8=83=E6=B5=81=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E6=B7=BB=E5=8A=A0=E5=9B=BE=E7=89=87=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../archiver_download_controller.dart | 2 +- .../controller/download_controller.dart | 8 +++---- lib/common/global.dart | 2 +- lib/pages/item/gallery_item_flow_large.dart | 24 ++++++++++++++++++- pubspec.yaml | 2 +- 5 files changed, 30 insertions(+), 8 deletions(-) diff --git a/lib/common/controller/archiver_download_controller.dart b/lib/common/controller/archiver_download_controller.dart index 85faeb451..96cf2a92f 100644 --- a/lib/common/controller/archiver_download_controller.dart +++ b/lib/common/controller/archiver_download_controller.dart @@ -49,7 +49,7 @@ class ArchiverDownloadController extends GetxController { @override void onInit() { super.onInit(); - logger.d('ArchiverDownloadController onInit'); + // logger.d('ArchiverDownloadController onInit'); IsolateNameServer.registerPortWithName( _port.sendPort, 'downloader_send_port'); diff --git a/lib/common/controller/download_controller.dart b/lib/common/controller/download_controller.dart index 7c778a576..42b31a0fc 100644 --- a/lib/common/controller/download_controller.dart +++ b/lib/common/controller/download_controller.dart @@ -60,7 +60,7 @@ class DownloadController extends GetxController { } } } else { - logger.d('add .nomedia file \n${pathSet.join('\n')}'); + // logger.d('add .nomedia file \n${pathSet.join('\n')}'); for (final dirPath in pathSet) { final File noMediaFile = File(path.join(dirPath, '.nomedia')); // if (!noMediaFile.existsSync()) { @@ -245,8 +245,8 @@ class DownloadController extends GetxController { @override void onInit() { super.onInit(); - logger.d( - 'DownloadController onInit multiDownload:${ehConfigService.multiDownload}'); + // logger.d( + // 'DownloadController onInit multiDownload:${ehConfigService.multiDownload}'); dState.executor = Executor(concurrency: ehConfigService.multiDownload); allowMediaScan(ehConfigService.allowMediaScan); _initGalleryTasks(); @@ -668,7 +668,7 @@ class DownloadController extends GetxController { } Future _initGalleryTasks() async { - logger5.v(' _initGalleryTasks'); + // logger5.v(' _initGalleryTasks'); GalleryTaskDao _galleryTaskDao; // ImageTaskDao _imageTaskDao; try { diff --git a/lib/common/global.dart b/lib/common/global.dart index c338a189a..7ce6f3964 100644 --- a/lib/common/global.dart +++ b/lib/common/global.dart @@ -130,7 +130,7 @@ class Global { // await CustomHttpsProxy.instance.init(); // } - logger.v('doc $appDocPath \napps $appSupportPath \ntemp $tempPath'); + // logger.v('doc $appDocPath \napps $appSupportPath \ntemp $tempPath'); dbPath = path.join(Global.appSupportPath, EHConst.DB_NAME); diff --git a/lib/pages/item/gallery_item_flow_large.dart b/lib/pages/item/gallery_item_flow_large.dart index 201ec2640..b89d00f55 100644 --- a/lib/pages/item/gallery_item_flow_large.dart +++ b/lib/pages/item/gallery_item_flow_large.dart @@ -1,5 +1,6 @@ import 'dart:ui'; +import 'package:blur/blur.dart'; import 'package:fehviewer/common/service/ehconfig_service.dart'; import 'package:fehviewer/common/service/theme_service.dart'; import 'package:fehviewer/const/theme_colors.dart'; @@ -67,6 +68,26 @@ class GalleryItemFlowLarge extends StatelessWidget { ); } + Widget _buildCount() { + return Container( + padding: const EdgeInsets.only(left: 2), + child: Text( + galleryItemController.galleryItem.filecount ?? '', + style: const TextStyle( + fontSize: 10, + color: Color.fromARGB(255, 240, 240, 240), + height: 1.12, + ), + ).frosted( + blur: 2, + frostColor: CupertinoColors.systemGrey2, + frostOpacity: 0.1, + borderRadius: BorderRadius.circular(6), + padding: const EdgeInsets.symmetric(vertical: 2, horizontal: 4), + ), + ); + } + /// 构建标题 Widget _buildTitle() { return Obx(() => Text( @@ -155,12 +176,13 @@ class GalleryItemFlowLarge extends StatelessWidget { child: Container( width: kWidth, height: kHeight, - color: _colorCategory, + color: _colorCategory.withOpacity(0.8), ), ), // Positioned( // bottom: 4, right: 4, child: _buildFavcatIcon()), // Positioned(bottom: 4, left: 4, child: _buildRating()), + Positioned(bottom: 4, right: 4, child: _buildCount()), Container( height: (kHeight + kRadius) / 2, width: (kWidth + kRadius) / 2, diff --git a/pubspec.yaml b/pubspec.yaml index 9ad7c4b9a..c8d399414 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: fehviewer publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 1.1.27+319 +version: 1.1.27+320 environment: sdk: '>=2.14.0 <3.0.0'