mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 Improve file history generation https://github.com/siyuan-note/siyuan/issues/16501
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
c917626d47
commit
364b253082
2 changed files with 3 additions and 2 deletions
|
|
@ -326,6 +326,7 @@ func setEditor(c *gin.Context) {
|
||||||
model.Conf.Save()
|
model.Conf.Save()
|
||||||
|
|
||||||
if oldGenerateHistoryInterval != model.Conf.Editor.GenerateHistoryInterval {
|
if oldGenerateHistoryInterval != model.Conf.Editor.GenerateHistoryInterval {
|
||||||
|
model.GenerateFileHistory()
|
||||||
model.ChangeHistoryTick(editor.GenerateHistoryInterval)
|
model.ChangeHistoryTick(editor.GenerateHistoryInterval)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,11 +54,11 @@ func AutoGenerateFileHistory() {
|
||||||
ChangeHistoryTick(Conf.Editor.GenerateHistoryInterval)
|
ChangeHistoryTick(Conf.Editor.GenerateHistoryInterval)
|
||||||
for {
|
for {
|
||||||
<-historyTicker.C
|
<-historyTicker.C
|
||||||
task.AppendTask(task.HistoryGenerateFile, generateFileHistory)
|
task.AppendTask(task.HistoryGenerateFile, GenerateFileHistory)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func generateFileHistory() {
|
func GenerateFileHistory() {
|
||||||
defer logging.Recover()
|
defer logging.Recover()
|
||||||
|
|
||||||
if 1 > Conf.Editor.GenerateHistoryInterval {
|
if 1 > Conf.Editor.GenerateHistoryInterval {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue