mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
chore: update
This commit is contained in:
@@ -20,7 +20,7 @@ import delayManager from "@/services/delay";
|
||||
import { cmdTestDelay, downloadIconCache } from "@/services/cmds";
|
||||
import { listen, UnlistenFn } from "@tauri-apps/api/event";
|
||||
import { convertFileSrc } from "@tauri-apps/api/core";
|
||||
|
||||
import { useListen } from "@/hooks/use-listen";
|
||||
interface Props {
|
||||
id: string;
|
||||
itemData: IVergeTestItem;
|
||||
@@ -47,6 +47,7 @@ export const TestItem = (props: Props) => {
|
||||
const [delay, setDelay] = useState(-1);
|
||||
const { uid, name, icon, url } = itemData;
|
||||
const [iconCachePath, setIconCachePath] = useState("");
|
||||
const { addListener } = useListen();
|
||||
|
||||
useEffect(() => {
|
||||
initIconCachePath();
|
||||
@@ -91,7 +92,7 @@ export const TestItem = (props: Props) => {
|
||||
|
||||
const listenTsetEvent = async () => {
|
||||
eventListener();
|
||||
eventListener = await listen("verge://test-all", () => {
|
||||
eventListener = await addListener("verge://test-all", () => {
|
||||
onDelay();
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user