mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-12-04 05:00:05 +08:00
refactor(frontend): outfox foxact, foxts, and eslint-plugin-sukka (#8808)
* chore(eslint): remove eslint-plugin-sukka * refactor(frontend): remove foxts and inline local utilities * refactor(frontend): remove foxact and replace with local hooks * refactor(proxy): reuse local storage for group preferences
This commit is contained in:
@@ -19,10 +19,6 @@ import {
|
||||
styled,
|
||||
} from '@mui/material'
|
||||
import { useLockFn } from 'ahooks'
|
||||
import {
|
||||
cancelIdleCallback,
|
||||
requestIdleCallback,
|
||||
} from 'foxact/request-idle-callback'
|
||||
import * as yaml from 'js-yaml'
|
||||
import {
|
||||
startTransition,
|
||||
@@ -350,10 +346,12 @@ export const GroupsEditorViewer = (props: Props) => {
|
||||
}
|
||||
}
|
||||
|
||||
const handle = requestIdleCallback(serialize)
|
||||
return () => {
|
||||
cancelIdleCallback(handle)
|
||||
if (typeof window.requestIdleCallback === 'function') {
|
||||
const handle = window.requestIdleCallback(serialize)
|
||||
return () => window.cancelIdleCallback(handle)
|
||||
}
|
||||
const handle = window.setTimeout(serialize, 1)
|
||||
return () => window.clearTimeout(handle)
|
||||
}
|
||||
}, [prependSeq, appendSeq, deleteSeq])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user