mirror of
https://github.com/wanghongenpin/proxypin.git
synced 2026-06-01 17:15:48 +08:00
fix: ensure configuration is flushed on enable change
This commit is contained in:
@@ -381,16 +381,10 @@ class _SwitchState extends State<_Switch> {
|
||||
changed = true;
|
||||
widget.onEnableChange(val);
|
||||
CertificateManager.cleanCache();
|
||||
widget.proxyServer.configuration.flushConfig();
|
||||
setState(() {});
|
||||
}))
|
||||
]));
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
if (changed) {
|
||||
widget.proxyServer.configuration.flushConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user