Remove deleted files from DB

This commit is contained in:
Andras Schmelczer 2025-03-20 22:26:19 +00:00
parent 1b7ab8b038
commit e7ec41eafe
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
2 changed files with 8 additions and 1 deletions

View file

@ -151,6 +151,11 @@ export class Database {
// No need to save as Promises don't get serialized
}
public removeDocument(find: DocumentRecord): void {
this.documents = this.documents.filter((document) => document !== find);
this.save();
}
public getLatestDocumentByRelativePath(
find: RelativePath
): DocumentRecord | undefined {