shortcuts dev

This commit is contained in:
Gabe Yuan
2023-09-07 23:47:24 +08:00
parent d8b0cc4834
commit 3b9b404482
7 changed files with 15389 additions and 10898 deletions

View File

@@ -8,12 +8,8 @@ export function useShortcut(action) {
const setShortcut = useCallback(
async (val) => {
await updateSetting({
shortcuts: {
...shortcuts,
[action]: val,
},
});
Object.assign(shortcuts, { [action]: val });
await updateSetting({ shortcuts });
},
[action, shortcuts, updateSetting]
);