Skip to content

Commit

Permalink
indexing functionality basically working end2end
Browse files Browse the repository at this point in the history
  • Loading branch information
samlhuillier committed Dec 1, 2023
1 parent aa2479d commit d67b99e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions electron/main/database/Table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ export const maybeRePopulateTable = async (
);

await table.add(entriesToAdd, onProgress);
if (onProgress) {
onProgress(1);
}
};

const isFileInDB = async (
Expand Down
16 changes: 8 additions & 8 deletions electron/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ import { FileInfoTree } from "./Files/Types";
import { registerDBSessionHandlers } from "./database/dbSessionHandlers";

const store = new Store<StoreSchema>();
const user = store.get("user");
// const user = store.get("user");

// Check if 'user' and 'directory' exist before attempting to delete
if (user && typeof user === "object" && "directory" in user) {
// Delete the 'directory' property
delete user.directory;
// // Check if 'user' and 'directory' exist before attempting to delete
// if (user && typeof user === "object" && "directory" in user) {
// // Delete the 'directory' property
// delete user.directory;

// Save the updated 'user' object back to the store
store.set("user", user);
}
// // Save the updated 'user' object back to the store
// store.set("user", user);
// }

process.env.DIST_ELECTRON = join(__dirname, "../");
process.env.DIST = join(process.env.DIST_ELECTRON, "../dist");
Expand Down

0 comments on commit d67b99e

Please sign in to comment.