Add chokidar watcher settings.
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user