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:
@@ -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),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user