This commit is contained in:
niuhuan 2022-10-15 01:54:50 +08:00
parent 3c30cd26e4
commit c879de5584
14 changed files with 75 additions and 30 deletions

View File

@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion flutter.compileSdkVersion
compileSdkVersion 33 // flutter.compileSdkVersion
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
@ -36,7 +36,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "niuhuan.pikapika"
minSdkVersion 19 // flutter.minSdkVersion
targetSdkVersion 33 // flutter.targetSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}

View File

@ -1 +1 @@
v1.5.12
v1.5.13

View File

@ -1,3 +1,16 @@
v1.5.12
## !! WARNING !!
IOS 用户请注意, 由于导出权限的问题, 本次升级后, 数据将会被移出数据库 并现显示到文件管理器, 您登录windows端后, 将文件复制到windows端的data目录并覆盖, 即可恢复数据继续阅读。 随后系统将会重新创建数据库, 您可将下载传输回手机。
其他平台用户不受影响。
##
v1.5.13
- [x] ♻升级flutter
- [x] 🚀IOS支持导出到文件
- [x] ♻消除WebToon横向阅读时的抖动
- [x] 🐛修复一些布局问题
- [x] ♻️反转下载章节的列表
- [x] 修复手动修改列数频道没有生效的问题

View File

@ -39,7 +39,7 @@ PODS:
- TOCropViewController (~> 2.6.1)
- image_picker_ios (0.0.1):
- Flutter
- "permission_handler (5.1.0+2)":
- permission_handler_apple (9.0.4):
- Flutter
- SDWebImage (5.12.5):
- SDWebImage/Core (= 5.12.5)
@ -58,7 +58,7 @@ DEPENDENCIES:
- Flutter (from `Flutter`)
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- uni_links (from `.symlinks/plugins/uni_links/ios`)
- uri_to_file (from `.symlinks/plugins/uri_to_file/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
@ -80,8 +80,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/image_cropper/ios"
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
permission_handler:
:path: ".symlinks/plugins/permission_handler/ios"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"
uni_links:
:path: ".symlinks/plugins/uni_links/ios"
uri_to_file:
@ -96,7 +96,7 @@ SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
image_cropper: 60c2789d1f1a78c873235d4319ca0c34a69f2d98
image_picker_ios: b786a5dcf033a8336a657191401bfdf12017dabb
permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce
SDWebImage: 0905f1b7760fc8ac4198cae0036600d67478751e
SwiftyGif: 6c3eafd0ce693cad58bb63d2b2fb9bacb8552780
TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863

View File

@ -12,8 +12,11 @@ import LocalAuthentication
) -> Bool {
let documentsPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0]
MobileInitApplication(documentsPath)
let applicationSupportsPath = NSSearchPathForDirectoriesInDomains(.applicationSupportDirectory, .userDomainMask, true)[0]
MobileMigration(documentsPath, applicationSupportsPath)
MobileInitApplication(applicationSupportsPath)
let controller = self.window.rootViewController as! FlutterViewController
let channel = FlutterMethodChannel.init(name: "method", binaryMessenger: controller as! FlutterBinaryMessenger)
@ -70,7 +73,9 @@ import LocalAuthentication
result(FlutterError(code: "", message: "params error", details: ""))
}
}
else{
else if call.method == "iosGetDocumentDir" {
result(documentsPath)
} else {
result(FlutterMethodNotImplemented)
}
}.start()

View File

@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIFileSharingEnabled</key>
<true/>
<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>

View File

@ -884,4 +884,7 @@ class Method {
return _flatInvoke("resetSwitchAddress", "");
}
Future<String> iosGetDocumentDir() async {
return await _channel.invokeMethod('iosGetDocumentDir', '');
}
}

View File

@ -36,10 +36,12 @@ class _AccountScreenState extends State<AccountScreen> {
@override
void initState() {
_linkSubscription = linkSubscript(context);
versionEvent.subscribe(_versionSub);
versionPop(context);
_loadProperties();
super.initState();
Future.delayed(Duration.zero, () async {
versionPop(context);
versionEvent.subscribe(_versionSub);
});
}
@override

View File

@ -29,9 +29,11 @@ class _AppScreenState extends State<AppScreen> {
void initState() {
versionEvent.subscribe(_onVersion);
_linkSubscription = linkSubscript(context);
versionEvent.subscribe(_versionSub);
versionPop(context);
super.initState();
Future.delayed(Duration.zero, () async {
versionPop(context);
versionEvent.subscribe(_versionSub);
});
}
@override

View File

@ -154,11 +154,11 @@ class _CategoriesScreenState extends State<CategoriesScreen> {
if (categoriesColumnCount == 0) {
var size = MediaQuery.of(context).size;
var min = size.width < size.height ? size.width : size.height;
blockSize = min / 3;
blockSize = (min ~/ 3).floorToDouble();
} else {
var size = MediaQuery.of(context).size;
var min = size.width;
blockSize = min / categoriesColumnCount;
blockSize = (min ~/ categoriesColumnCount).floorToDouble();
}
imageSize = blockSize - 15;
@ -252,11 +252,11 @@ class _CategoriesScreenState extends State<CategoriesScreen> {
if (categoriesColumnCount == 0) {
var size = MediaQuery.of(context).size;
var min = size.width < size.height ? size.width : size.height;
blockSize = min / 3;
blockSize = (min ~/ 3).floorToDouble();
} else {
var size = MediaQuery.of(context).size;
var min = size.width;
blockSize = min / categoriesColumnCount;
blockSize = (min ~/ categoriesColumnCount).floorToDouble();
}
imageSize = blockSize - 15;

View File

@ -140,7 +140,9 @@ class _DownloadExportToFileScreenState
onPressed: () async {
late String? path;
try {
path = await chooseFolder(context);
path = Platform.isIOS
? await method.iosGetDocumentDir()
: await chooseFolder(context);
} catch (e) {
defaultToast(context, "$e");
return;
@ -191,7 +193,9 @@ class _DownloadExportToFileScreenState
onPressed: () async {
late String? path;
try {
path = await chooseFolder(context);
path = Platform.isIOS
? await method.iosGetDocumentDir()
: await chooseFolder(context);
} catch (e) {
defaultToast(context, "$e");
return;
@ -244,7 +248,9 @@ class _DownloadExportToFileScreenState
onPressed: () async {
late String? path;
try {
path = await chooseFolder(context);
path = Platform.isIOS
? await method.iosGetDocumentDir()
: await chooseFolder(context);
} catch (e) {
defaultToast(context, "$e");
return;
@ -296,7 +302,9 @@ class _DownloadExportToFileScreenState
onPressed: () async {
late String? path;
try {
path = await chooseFolder(context);
path = Platform.isIOS
? await method.iosGetDocumentDir()
: await chooseFolder(context);
} catch (e) {
defaultToast(context, "$e");
return;

View File

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:pikapika/basic/Common.dart';
@ -79,7 +81,9 @@ class _DownloadExportingGroupScreenState
_exportPkz() async {
late String? path;
try {
path = await chooseFolder(context);
path = Platform.isIOS
? await method.iosGetDocumentDir()
: await chooseFolder(context);
} catch (e) {
defaultToast(context, "$e");
return;
@ -127,7 +131,9 @@ class _DownloadExportingGroupScreenState
}
late String? path;
try {
path = await chooseFolder(context);
path = Platform.isIOS
? await method.iosGetDocumentDir()
: await chooseFolder(context);
} catch (e) {
defaultToast(context, "$e");
return;
@ -161,7 +167,9 @@ class _DownloadExportingGroupScreenState
}
late String? path;
try {
path = await chooseFolder(context);
path = Platform.isIOS
? await method.iosGetDocumentDir()
: await chooseFolder(context);
} catch (e) {
defaultToast(context, "$e");
return;

View File

@ -203,7 +203,7 @@ class _DownloadInfoScreenState extends State<DownloadInfoScreen>
}
},
),
..._epList.map((e) {
..._epList.reversed.map((e) {
return MaterialButton(
onPressed: () {
_push(_task, _epList, e.epOrder, null);

View File

@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.5.12+6
version: 1.5.13+7
environment:
sdk: ">=2.12.0 <3.0.0"