♻️ Implement some delayed kernel events using task queues https://github.com/siyuan-note/siyuan/issues/12393

This commit is contained in:
Daniel 2024-09-05 16:41:50 +08:00
parent 50adf9751b
commit ffe737f55c
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 7 additions and 9 deletions

View file

@ -30,6 +30,7 @@ import (
"github.com/88250/lute/ast"
"github.com/siyuan-note/filelock"
"github.com/siyuan-note/logging"
"github.com/siyuan-note/siyuan/kernel/task"
"github.com/siyuan-note/siyuan/kernel/util"
)
@ -218,10 +219,8 @@ func Mount(boxID string) (alreadyMount bool, err error) {
Conf.Save()
}
task.AppendTaskWithDelay(task.PushMsg, 3*time.Second, util.PushErrMsg, Conf.Language(52), 7000)
go func() {
time.Sleep(time.Second * 3)
util.PushErrMsg(Conf.Language(52), 7000)
// 每次打开帮助文档时自动检查版本更新并提醒 https://github.com/siyuan-note/siyuan/issues/5057
time.Sleep(time.Second * 10)
CheckUpdate(true)