diff --git a/frontend/sync-client/src/utils/find-matching-file-based-on-hash.ts b/frontend/sync-client/src/utils/find-matching-file.ts similarity index 59% rename from frontend/sync-client/src/utils/find-matching-file-based-on-hash.ts rename to frontend/sync-client/src/utils/find-matching-file.ts index 6a247f5f..27a4c875 100644 --- a/frontend/sync-client/src/utils/find-matching-file-based-on-hash.ts +++ b/frontend/sync-client/src/utils/find-matching-file.ts @@ -1,7 +1,8 @@ -import type { DocumentMetadata, RelativePath } from "src/persistence/database"; +import type { DocumentMetadata, RelativePath } from "../persistence/database"; import { EMPTY_HASH } from "./hash"; -export function findMatchingFileBasedOnHash( +// TODO: make this smarter so that offline files can be renamed & edited at the same time +export function findMatchingFile( contentHash: string, candidates: [RelativePath, DocumentMetadata][] ): [RelativePath, DocumentMetadata] | undefined {