mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-05 23:44:22 +00:00
Fix infinite file list load bug
This commit is contained in:
@@ -46,12 +46,15 @@ const useFileManagement = (gitEnabled = false) => {
|
||||
|
||||
useEffect(() => {
|
||||
const initializeFileSystem = async () => {
|
||||
await pullLatestChanges();
|
||||
await loadFileList();
|
||||
if (gitEnabled) {
|
||||
await pullLatestChanges();
|
||||
} else {
|
||||
await loadFileList();
|
||||
}
|
||||
};
|
||||
|
||||
initializeFileSystem();
|
||||
}, [pullLatestChanges, loadFileList]);
|
||||
}, [gitEnabled]);
|
||||
|
||||
const handleFileSelect = async (filePath) => {
|
||||
if (hasUnsavedChanges) {
|
||||
|
||||
Reference in New Issue
Block a user