Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Inline

Manav Rathi4e3cce51dea1
diff --git a/desktop/src/services/watch.ts b/desktop/src/services/watch.ts
index 3505be744b..59ef842f7a 100644
--- a/desktop/src/services/watch.ts
+++ b/desktop/src/services/watch.ts
@@ -2,7 +2,6 @@ import type { FSWatcher } from "chokidar";
import ElectronLog from "electron-log";
import { watchStore } from "../stores/watch.store";
import { WatchMapping, WatchStoreType } from "../types/ipc";
-import { isMappingPresent } from "../utils/watch";
export const addWatchMapping = async (
watcher: FSWatcher,
@@ -29,6 +28,13 @@ export const addWatchMapping = async (
setWatchMappings(watchMappings);
};
+function isMappingPresent(watchMappings: WatchMapping[], folderPath: string) {
+ const watchMapping = watchMappings?.find(
+ (mapping) => mapping.folderPath === folderPath,
+ );
+ return !!watchMapping;
+}
+
export const removeWatchMapping = async (
watcher: FSWatcher,
folderPath: string,
diff --git a/desktop/src/utils/watch.ts b/desktop/src/utils/watch.ts
deleted file mode 100644
index b5bf130297..0000000000
--- a/desktop/src/utils/watch.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { WatchMapping } from "../types/ipc";
-
-export function isMappingPresent(
- watchMappings: WatchMapping[],
- folderPath: string,
-) {
- const watchMapping = watchMappings?.find(
- (mapping) => mapping.folderPath === folderPath,
- );
- return !!watchMapping;
-}