mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-12 21:52:13 +08:00
chore: update tauri-plugin-mihomo deps
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { useLockFn } from "ahooks";
|
||||
import { useCallback, useMemo } from "react";
|
||||
import {
|
||||
closeConnections,
|
||||
closeConnection,
|
||||
getConnections,
|
||||
selectNodeForGroup,
|
||||
} from "tauri-plugin-mihomo-api";
|
||||
@@ -16,7 +16,7 @@ const cleanupConnections = async (previousProxy: string) => {
|
||||
const { connections } = await getConnections();
|
||||
const cleanupPromises = (connections ?? [])
|
||||
.filter((conn) => conn.chains.includes(previousProxy))
|
||||
.map((conn) => closeConnections(conn.id));
|
||||
.map((conn) => closeConnection(conn.id));
|
||||
|
||||
if (cleanupPromises.length > 0) {
|
||||
await Promise.allSettled(cleanupPromises);
|
||||
|
||||
Reference in New Issue
Block a user