Skip to content

Commit

Permalink
Feat: 瀑布流视图添加图片数量
Browse files Browse the repository at this point in the history
  • Loading branch information
honjow committed Oct 22, 2021
1 parent fbcfb83 commit 59d3471
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/common/controller/archiver_download_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
8 changes: 4 additions & 4 deletions lib/common/controller/download_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -668,7 +668,7 @@ class DownloadController extends GetxController {
}

Future<void> _initGalleryTasks() async {
logger5.v(' _initGalleryTasks');
// logger5.v(' _initGalleryTasks');
GalleryTaskDao _galleryTaskDao;
// ImageTaskDao _imageTaskDao;
try {
Expand Down
2 changes: 1 addition & 1 deletion lib/common/global.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
24 changes: 23 additions & 1 deletion lib/pages/item/gallery_item_flow_large.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 59d3471

Please sign in to comment.