truly disable check problems (#566)

This commit is contained in:
Will Chen
2025-07-03 17:51:37 -07:00
committed by GitHub
parent d0f6e40378
commit 77e39874ad
4 changed files with 38 additions and 13 deletions

View File

@@ -1,8 +1,10 @@
import { useQuery } from "@tanstack/react-query";
import { IpcClient } from "@/ipc/ipc_client";
import type { ProblemReport } from "@/ipc/ipc_types";
import { useSettings } from "./useSettings";
export function useCheckProblems(appId: number | null) {
const { settings } = useSettings();
const {
data: problemReport,
isLoading: isChecking,
@@ -17,7 +19,7 @@ export function useCheckProblems(appId: number | null) {
const ipcClient = IpcClient.getInstance();
return ipcClient.checkProblems({ appId });
},
enabled: !!appId,
enabled: !!appId && settings?.enableAutoFixProblems,
// DO NOT SHOW ERROR TOAST.
});