Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

Commit 087b09f

Browse files
committed
Upgrade to v1.5.1
1 parent 46403f4 commit 087b09f

9 files changed

Lines changed: 246 additions & 234 deletions

File tree

ci/version.code.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.4.6
1+
v1.5.1

ci/version.info.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
- [x] 修复 分流2 / 分流3, API速度得到提高
2-
- [x] 看此本子多人也在看
3-
- [x] 本子神推荐/魔推荐
1+
- [x] 修复一些BUG
2+
- [x] 优化阅读器 (之前丢了一部分代码, 导致被回滚了, 全屏按钮重新写了一遍)
3+
- [x] 优化导入导出 / 保存图片等文件系统交互操作
4+
- [x] 优化推荐栏目

lib/basic/Cross.dart

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import 'dart:io';
33

44
import 'package:clipboard/clipboard.dart';
5-
import 'package:filesystem_picker/filesystem_picker.dart';
5+
import 'package:file_picker/file_picker.dart';
66
import 'package:flutter/material.dart';
77
import 'package:permission_handler/permission_handler.dart';
88
import 'package:pikapika/basic/Common.dart';
@@ -77,13 +77,12 @@ Future<dynamic> _saveImageAndroid(String path, BuildContext context) async {
7777

7878
/// 选择一个文件夹用于保存文件
7979
Future<String?> chooseFolder(BuildContext context) async {
80-
return FilesystemPicker.open(
81-
title: '选择一个文件夹',
82-
pickText: '将文件保存到这里',
83-
context: context,
84-
fsType: FilesystemType.folder,
85-
rootDirectory:
86-
Directory.fromUri(Uri.file(await currentChooserRoot())).absolute,
80+
return FilePicker.platform.getDirectoryPath(
81+
dialogTitle: "选择一个文件夹, 将文件保存到这里",
82+
initialDirectory: Directory
83+
.fromUri(Uri.file(await currentChooserRoot()))
84+
.absolute
85+
.path,
8786
);
8887
}
8988

lib/screens/ComicCollectionsScreen.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ class _ComicCollectionsScreenState extends State<ComicCollectionsScreen> {
7373
color: appBarTheme.backgroundColor,
7474
child: TabBar(
7575
indicatorColor: theme.dividerColor,
76-
tabs: collection.map((e) => Tab(text: e.title)).toList(),
76+
tabs: collection
77+
.map((e) => Tab(
78+
text: e.title.indexOf("推薦") > 0
79+
? e.title.substring(0, e.title.indexOf("推薦"))
80+
: e.title))
81+
.toList(),
7782
),
7883
),
7984
body: TabBarView(

lib/screens/DownloadImportScreen.dart

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import 'dart:io';
22

3-
import 'package:filesystem_picker/filesystem_picker.dart';
3+
import 'package:file_picker/file_picker.dart';
44
import 'package:flutter/material.dart';
55
import 'package:pikapika/basic/Channels.dart';
66
import 'package:pikapika/basic/Common.dart';
@@ -43,7 +43,7 @@ class _DownloadImportScreenState extends State<DownloadImportScreen> {
4343
}
4444

4545
@override
46-
Widget build(BuildContext context){
46+
Widget build(BuildContext context) {
4747
return rightClickPop(
4848
child: buildScreen(context),
4949
context: context,
@@ -96,15 +96,15 @@ class _DownloadImportScreenState extends State<DownloadImportScreen> {
9696
defaultToast(context, "$e");
9797
return;
9898
}
99-
String? path = await FilesystemPicker.open(
100-
title: '选择要导入的文件',
101-
context: context,
102-
rootDirectory: Directory(chooseRoot),
103-
fsType: FilesystemType.file,
104-
folderIconColor: Colors.teal,
105-
allowedExtensions: ['.zip'],
106-
fileTileSelectMode: FileTileSelectMode.wholeTile,
99+
var ls = await FilePicker.platform.pickFiles(
100+
dialogTitle: '选择要导入的文件',
101+
allowMultiple: false,
102+
initialDirectory: chooseRoot,
103+
type: FileType.custom,
104+
allowedExtensions: ['zip'],
105+
allowCompression: false,
107106
);
107+
String? path = ls != null && ls.count > 0 ? ls.paths[0] : null;
108108
if (path != null) {
109109
try {
110110
setState(() {

0 commit comments

Comments
 (0)