Add chokidar watcher settings.

This commit is contained in:
Patrick Fic
2025-03-12 16:06:22 -07:00
parent a01d4bfb44
commit 10368f8f9e
8 changed files with 195 additions and 10 deletions

View File

@@ -16,16 +16,31 @@ const SettingsWatchedFilePathsAdd = async (event: IpcMainInvokeEvent) => {
if (!result.canceled) {
Store.set(
"settings.filepaths",
_.union(result.filePaths, Store.get("filepaths"))
_.union(result.filePaths, Store.get("settings.filepaths"))
);
}
return Store.get("settings.filepaths");
};
const SettingsWatchedFilePathsRemove = async (
event: IpcMainInvokeEvent,
path: string
) => {
Store.set(
"settings.filepaths",
_.without(Store.get("settings.filepaths"), path)
);
return Store.get("settings.filepaths");
};
const SettingsWatchedFilePathsGet = async (event: IpcMainInvokeEvent) => {
const filepaths = Store.get("settings.filepaths");
return filepaths;
};
export { SettingsWatchedFilePathsAdd, SettingsWatchedFilePathsGet };
export {
SettingsWatchedFilePathsAdd,
SettingsWatchedFilePathsGet,
SettingsWatchedFilePathsRemove,
};