Skip to content

Commit

Permalink
fix: enhance when change tun config
Browse files Browse the repository at this point in the history
  • Loading branch information
MystiPanda committed May 4, 2024
1 parent 05fa6b9 commit 3271c96
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/setting/mods/tun-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
import { useClash } from "@/hooks/use-clash";
import { BaseDialog, DialogRef, Notice, Switch } from "@/components/base";
import { StackModeSwitch } from "./stack-mode-switch";
import { enhanceProfiles } from "@/services/cmds";

export const TunViewer = forwardRef<DialogRef>((props, ref) => {
const { t } = useTranslation();
Expand Down Expand Up @@ -65,6 +66,12 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
}),
false
);
try {
await enhanceProfiles();
Notice.success("Refresh clash config", 1000);
} catch (err: any) {
Notice.error(err.message || err.toString(), 3000);
}
setOpen(false);
} catch (err: any) {
Notice.error(err.message || err.toString());
Expand Down

0 comments on commit 3271c96

Please sign in to comment.