mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 16:04:23 +00:00
Enable autocommit for delete and create
This commit is contained in:
@@ -33,18 +33,10 @@ const MainContent = ({ selectedFile, handleFileSelect, handleLinkClick }) => {
|
||||
let success = await handleSave(filePath, content);
|
||||
if (success) {
|
||||
setHasUnsavedChanges(false);
|
||||
|
||||
if (settings.gitAutoCommit && settings.gitEnabled) {
|
||||
const commitMessage = settings.gitCommitMsgTemplate.replace(
|
||||
'${filename}',
|
||||
filePath
|
||||
);
|
||||
success = await handleCommitAndPush(commitMessage);
|
||||
}
|
||||
}
|
||||
return success;
|
||||
},
|
||||
[handleSave, setHasUnsavedChanges, settings, handleCommitAndPush]
|
||||
[handleSave, setHasUnsavedChanges]
|
||||
);
|
||||
|
||||
const handleCreateFile = useCallback(
|
||||
|
||||
Reference in New Issue
Block a user