@setoelkahfi / svara / commits / 3aa0dc9

chore: file tree opens before directory loads

mellbacon committed Aug 2, 2023 at 10:49 UTC 3aa0dc98652242189373b666ba9838034bc1a59d
1 file changed +1 -1
src/lib/File.ts
+1 -1
@@ -23,6 +23,7 @@ export async function openFolder() {
23 // if file path is not in the configured scope already, add it
24 // TODO: should configure this so it doesnt access restricted paths based on user permissions
25 await invoke("attempt_file_access", {app_handle: window, p: directory});
26 + openFileTree();
27
28 const directoryName = await updateTree(directory);
29 if (!directoryName) {
@@ -38,7 +39,6 @@ export async function openFolder() {
39 )
40
41 workspaceName.set(directoryName);
41 - openFileTree();
42 }
43
44 export const treeLoading = writable(false);