Compare commits

...

2 Commits

Author SHA1 Message Date
chen08209
fd1dfe5c60 Fix Tab destroy error 2024-05-06 19:05:27 +08:00
chen08209
9f89fe8b29 Optimize repeat healthcheck 2024-05-06 17:17:26 +08:00
6 changed files with 19 additions and 8 deletions

View File

@@ -193,7 +193,6 @@ func hcCompatibleProvider(proxyProviders map[string]provider.ProxyProvider) {
}
}
}
func applyConfig(isPatch bool) {
@@ -205,5 +204,6 @@ func applyConfig(isPatch bool) {
patchConfig(cfg.General)
} else {
executor.ApplyConfig(cfg, true)
healthcheck()
}
}

View File

@@ -120,6 +120,10 @@ func changeProxy(s *C.char) bool {
return true
}
// clearEffect
func clearConfigEffect() {
}
//export getTraffic
func getTraffic() *C.char {
up, down := statistic.DefaultManager.Now()

View File

@@ -83,6 +83,13 @@ class _ProxiesFragmentState extends State<ProxiesFragment>
groupNames: groupNames,
);
},
shouldRebuild: (prev,next){
if(prev.groupNames.length != next.groupNames.length){
_tabController?.dispose();
_tabController =null;
}
return prev != next;
},
builder: (_, state, __) {
_tabController ??= TabController(
length: state.groupNames.length,
@@ -114,7 +121,6 @@ class _ProxiesFragmentState extends State<ProxiesFragment>
children: [
for (final groupName in state.groupNames)
KeepContainer(
key: ObjectKey(groupName),
child: ProxiesTabView(
groupName: groupName,
),

View File

@@ -38,13 +38,14 @@ class _ClashMessageContainerState extends State<ClashMessageContainer>
@override
void onDelay(Delay delay) {
final appController = context.appController;
appController.setDelay(delay);
globalState.healthcheckLock = true;
context.appController.setDelay(delay);
WidgetsBinding.instance.addPostFrameCallback((_) {
globalState.updateSortNumDebounce ??= debounce<Function()>(
() {
context.appController.updateGroups();
context.appController.appState.sortNum++;
() async {
await appController.updateGroups();
appController.appState.sortNum++;
globalState.healthcheckLock = false;
},
milliseconds: 5000,

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.11
version: 0.7.13
environment:
sdk: '>=3.1.0 <4.0.0'