Fix android vpn close issues

Add requests page

Fix checkUpdate dark mode style error

Fix quickStart error open app

Add memory proxies tab index

Support hidden group

Optimize logs
This commit is contained in:
chen08209
2024-06-13 23:43:42 +08:00
parent 5ab4dd0cbd
commit f7abf6446c
56 changed files with 1437 additions and 496 deletions

View File

@@ -18,6 +18,11 @@ class App {
methodChannel = const MethodChannel("app");
methodChannel!.setMethodCallHandler((call) async {
switch (call.method) {
case "exit":
if (onExit != null) {
await onExit!();
}
break;
case "gc":
clashCore.requestGc();
break;
@@ -63,9 +68,9 @@ class App {
});
}
Future<String?> getPackageName(Metadata metadata) async {
return await methodChannel?.invokeMethod<String>("getPackageName", {
"data": json.encode(metadata),
Future<String?> resolverProcess(Process process) async {
return await methodChannel?.invokeMethod<String>("resolverProcess", {
"data": json.encode(process),
});
}
}

View File

@@ -56,10 +56,6 @@ class Proxy extends ProxyPlatform {
return await methodChannel.invokeMethod<bool?>("SetProtect", {'fd': fd});
}
Future<int?> getRunTimeStamp() async {
return await methodChannel.invokeMethod<int?>("GetRunTimeStamp");
}
Future<bool?> startForeground({
required String title,
required String content,
@@ -80,14 +76,7 @@ class Proxy extends ProxyPlatform {
}
updateStartTime() async {
startTime = await getRunTime();
}
Future<DateTime?> getRunTime() async {
final runTimeStamp = await getRunTimeStamp();
return runTimeStamp != null
? DateTime.fromMillisecondsSinceEpoch(runTimeStamp)
: null;
startTime = clashCore.getRunTime();
}
}