Compare commits

..

2 Commits

Author SHA1 Message Date
chen08209
2d0a7d8d46 Fix the problem that the proxy group is empty in global mode.
Some checks failed
build / build (macos-13, macos) (push) Has been cancelled
build / build (ubuntu-latest, android) (push) Has been cancelled
build / build (ubuntu-latest, linux) (push) Has been cancelled
build / build (windows-latest, windows) (push) Has been cancelled
build / upload-release (push) Has been cancelled
2024-05-03 23:08:06 +08:00
chen08209
ca96cd1d82 Fix the problem that the proxy group is empty in global mode. 2024-05-03 23:07:38 +08:00
2 changed files with 6 additions and 9 deletions

View File

@@ -74,15 +74,12 @@ class ClashCore {
final proxiesRawString = proxiesRaw.cast<Utf8>().toDartString();
return Isolate.run<List<Group>>(() {
final proxies = json.decode(proxiesRawString);
final groupsRaw = (proxies[UsedProxy.GLOBAL.name]["all"] as List)
.where((e) {
final groupNames =
(proxies[UsedProxy.GLOBAL.name]["all"] as List).where((e) {
final proxy = proxies[e];
final excludeName = !UsedProxyExtension.valueList
.where((element) => element != UsedProxy.GLOBAL.name)
.contains(proxy['name']);
final validType = GroupTypeExtension.valueList.contains(proxy['type']);
return excludeName && validType;
}).map((groupName) {
return GroupTypeExtension.valueList.contains(proxy['type']);
});
final groupsRaw = [UsedProxy.GLOBAL.name, ...groupNames].map((groupName) {
final group = proxies[groupName];
group["all"] = ((group["all"] ?? []) as List)
.map(

View File

@@ -1,7 +1,7 @@
name: fl_clash
description: A multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free.
publish_to: 'none'
version: 0.7.4
version: 0.7.5
environment:
sdk: '>=3.1.0 <4.0.0'