auto restart core

This commit is contained in:
pompurin404 2024-11-14 22:57:01 +08:00
parent bb437f96a7
commit 9e078d78a5
No known key found for this signature in database

View File

@ -145,9 +145,14 @@ const MihomoConfig: React.FC = () => {
size="sm"
selectedKeys={new Set([mihomoCpuPriority])}
onSelectionChange={async (v) => {
await patchAppConfig({
mihomoCpuPriority: v.currentKey as Priority
})
try {
await patchAppConfig({
mihomoCpuPriority: v.currentKey as Priority
})
await restartCore()
} catch (e) {
alert(e)
}
}}
>
<SelectItem key="PRIORITY_HIGHEST"></SelectItem>