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