fix functions
This commit is contained in:
parent
c11e9d4878
commit
e85c16accb
|
@ -12,7 +12,7 @@ function WatchModal({ watchModalView, setWatchModalView }) {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (shouldUpdateMappings) {
|
if (shouldUpdateMappings) {
|
||||||
setMappings(watchService.ElectronAPIs.getWatchMappings());
|
setMappings(watchService.getWatchMappings());
|
||||||
setShouldUpdateMappings(false);
|
setShouldUpdateMappings(false);
|
||||||
}
|
}
|
||||||
}, [shouldUpdateMappings]);
|
}, [shouldUpdateMappings]);
|
||||||
|
|
|
@ -105,12 +105,12 @@ class WatchService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async addWatchMapping(collectionName: string, folderPath: string) {
|
addWatchMapping(collectionName: string, folderPath: string) {
|
||||||
await this.ElectronAPIs.addWatchMapping(collectionName, folderPath);
|
this.ElectronAPIs.addWatchMapping(collectionName, folderPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
async removeWatchMapping(collectionName: string) {
|
removeWatchMapping(collectionName: string) {
|
||||||
await this.ElectronAPIs.removeWatchMapping(collectionName);
|
this.ElectronAPIs.removeWatchMapping(collectionName);
|
||||||
}
|
}
|
||||||
|
|
||||||
getWatchMappings(): WatchMapping[] {
|
getWatchMappings(): WatchMapping[] {
|
||||||
|
|
Loading…
Reference in a new issue