Update ua

Fix change outbound mode without check ip issues
This commit is contained in:
chen08209
2024-07-13 20:23:54 +08:00
parent c6407984ac
commit 2dd45062f1
9 changed files with 20 additions and 11 deletions

View File

@@ -216,7 +216,12 @@ class _ProfileItemState extends State<ProfileItem> {
Future updateProfile([isSingle = true]) async {
isUpdating.value = true;
try {
await globalState.appController.updateProfile(widget.profile);
final appController = globalState.appController;
await appController.updateProfile(widget.profile);
if (widget.profile.id == appController.config.currentProfile?.id &&
!appController.appState.isStart) {
globalState.appController.rawApplyProfile();
}
} catch (e) {
isUpdating.value = false;
if (!isSingle) {