Skip to content

Commit 57d80be

Browse files
committed
android 0.9.82
1 parent 2dda47a commit 57d80be

File tree

7 files changed

+44
-20
lines changed

7 files changed

+44
-20
lines changed

android/app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ android {
8080
applicationId = packageName
8181
minSdk = flutter.minSdkVersion
8282
targetSdk = 35
83-
versionCode = 10009801
84-
versionName = "0.9.81 predicate"
83+
versionCode = 10009820
84+
versionName = "0.9.82 port"
8585
ndk {
8686
abiFilters.addAll(arrayOf("armeabi-v7a", "arm64-v8a", "x86_64"))
8787
}

ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '13.0'
2+
platform :ios, '13.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

ios/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ SPEC CHECKSUMS:
4646
receive_sharing_intent: 222384f00ffe7e952bbfabaa9e3967cb87e5fe00
4747
rhttp: 359daed992674fc912552df3106bfbc746bcc929
4848

49-
PODFILE CHECKSUM: 3b292933a45bc95b47d4515d4c08f8fa56b8f8b8
49+
PODFILE CHECKSUM: b24155e93407be36a2b6ddd91ab8e5a09dc38630
5050

5151
COCOAPODS: 1.16.2

ios/Runner.xcodeproj/project.pbxproj

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@
317317
);
318318
mainGroup = 97C146E51CF9000F007C117D;
319319
packageReferences = (
320-
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
320+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
321321
CF18B5642D0EDB1A0096872D /* XCRemoteSwiftPackageReference "fmdb" */,
322322
);
323323
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
@@ -377,14 +377,10 @@
377377
inputFileListPaths = (
378378
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
379379
);
380-
inputPaths = (
381-
);
382380
name = "[CP] Embed Pods Frameworks";
383381
outputFileListPaths = (
384382
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
385383
);
386-
outputPaths = (
387-
);
388384
runOnlyForDeploymentPostprocessing = 0;
389385
shellPath = /bin/sh;
390386
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
@@ -413,14 +409,10 @@
413409
inputFileListPaths = (
414410
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
415411
);
416-
inputPaths = (
417-
);
418412
name = "[CP] Copy Pods Resources";
419413
outputFileListPaths = (
420414
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
421415
);
422-
outputPaths = (
423-
);
424416
runOnlyForDeploymentPostprocessing = 0;
425417
shellPath = /bin/sh;
426418
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
@@ -944,7 +936,7 @@
944936
/* End XCConfigurationList section */
945937

946938
/* Begin XCLocalSwiftPackageReference section */
947-
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
939+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = {
948940
isa = XCLocalSwiftPackageReference;
949941
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
950942
};

lib/constants.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import 'dart:io';
1818

1919
class Constants {
2020
static const String no_h = 'assets/images/h_long.jpg';
21-
static String tagName = "0.9.81";
21+
static String tagName = "0.9.82";
2222
static const isGooglePlay =
2323
bool.fromEnvironment("IS_GOOGLEPLAY", defaultValue: false);
2424
static int type = 0;

lib/er/fetcher.dart

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ import 'dart:io';
1717

1818
import 'dart:isolate';
1919

20+
import 'package:dio/dio.dart';
21+
import 'package:dio_compatibility_layer/dio_compatibility_layer.dart';
2022
import 'package:flutter/material.dart';
2123
import 'package:flutter/services.dart';
2224
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
25+
import 'package:flutter_cache_manager_dio/flutter_cache_manager_dio.dart';
2326
import 'package:path_provider/path_provider.dart';
2427
import 'package:pixez/component/pixiv_image.dart';
2528
import 'package:pixez/er/hoster.dart';
@@ -31,7 +34,7 @@ import 'package:pixez/models/illust.dart';
3134
import 'package:pixez/models/task_persist.dart';
3235
import 'package:pixez/store/save_store.dart';
3336
import 'package:quiver/collection.dart';
34-
import 'package:rhttp/rhttp.dart';
37+
import 'package:rhttp/rhttp.dart' as r;
3538

3639
enum IsoTaskState { INIT, APPEND, PROGRESS, ERROR, COMPLETE }
3740

@@ -144,6 +147,7 @@ class Fetcher {
144147
SendMessage(
145148
receivePort.sendPort,
146149
pictureSource,
150+
userSetting.disableBypassSni,
147151
RootIsolateToken.instance!,
148152
),
149153
debugName: 'childIsolate',
@@ -236,9 +240,15 @@ class Fetcher {
236240
class SendMessage {
237241
final SendPort sendPort;
238242
final String pictureSource;
243+
final bool disableBypassSni;
239244
final RootIsolateToken rootIsolateToken;
240245

241-
SendMessage(this.sendPort, this.pictureSource, this.rootIsolateToken);
246+
SendMessage(
247+
this.sendPort,
248+
this.pictureSource,
249+
this.disableBypassSni,
250+
this.rootIsolateToken,
251+
);
242252
}
243253

244254
entryPoint(SendMessage message) async {
@@ -248,10 +258,32 @@ entryPoint(SendMessage message) async {
248258
LPrinter.d("entryPoint ====== $pictureSource");
249259
String inSource = pictureSource;
250260
BackgroundIsolateBinaryMessenger.ensureInitialized(rootIsolateToken);
251-
await Rhttp.init();
261+
await r.Rhttp.init();
252262
await Hoster.initMap();
253263
Hoster.dnsQueryFetcher();
254-
await PixivImage.generatePixivCache();
264+
final dio = Dio();
265+
final client = await r.RhttpCompatibleClient.createSync(
266+
settings: (message.disableBypassSni || pictureSource != ImageHost)
267+
? null
268+
: r.ClientSettings(
269+
tlsSettings: r.TlsSettings(verifyCertificates: false, sni: false),
270+
dnsSettings: r.DnsSettings.dynamic(
271+
resolver: (host) async {
272+
if (host == 'i.pximg.net') {
273+
return [Hoster.iPximgNet()];
274+
}
275+
if (host == 's.pximg.net') {
276+
return [Hoster.sPximgNet()];
277+
}
278+
return await InternetAddress.lookup(
279+
host,
280+
).then((value) => value.map((e) => e.address).toList());
281+
},
282+
),
283+
),
284+
);
285+
dio.httpClientAdapter = ConversionLayerAdapter(client);
286+
DioCacheManager.initialize(dio);
255287
ReceivePort receivePort = ReceivePort();
256288
sendPort.send(
257289
IsoContactBean(state: IsoTaskState.INIT, data: receivePort.sendPort),

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies:
2424
flutter_localizations:
2525
sdk: flutter
2626
dio: ^5.9.0
27-
crypto: ^3.0.6
27+
crypto: ^3.0.7
2828
path_provider: ^2.1.5
2929
shared_preferences: ^2.5.3
3030
share_plus: ^12.0.1

0 commit comments

Comments
 (0)