Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2023-04-26 10:25:44 +08:00
commit c7d2b8cde2
2 changed files with 5 additions and 0 deletions

View file

@ -49,6 +49,7 @@ import (
"github.com/siyuan-note/siyuan/kernel/cache"
"github.com/siyuan-note/siyuan/kernel/conf"
"github.com/siyuan-note/siyuan/kernel/filesys"
"github.com/siyuan-note/siyuan/kernel/sql"
"github.com/siyuan-note/siyuan/kernel/task"
"github.com/siyuan-note/siyuan/kernel/treenode"
"github.com/siyuan-note/siyuan/kernel/util"
@ -1244,6 +1245,7 @@ func processSyncMergeResult(exit, byHand bool, start time.Time, mergeResult *dej
upsertRootIDs, removeRootIDs := incReindex(upserts, removes)
elapsed := time.Since(start)
go func() {
sql.WaitForWritingDatabase()
util.WaitForUILoaded()
if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container {

View file

@ -261,6 +261,9 @@ func checkSync(boot, exit, byHand bool) bool {
// incReindex 增量重建索引。
func incReindex(upserts, removes []string) (upsertRootIDs, removeRootIDs []string) {
upsertRootIDs = []string{}
removeRootIDs = []string{}
util.IncBootProgress(3, "Sync reindexing...")
msg := fmt.Sprintf(Conf.Language(35))
util.PushStatusBar(msg)