🎨 Partially refresh the interface after data synchronization https://github.com/siyuan-note/siyuan/issues/8098

This commit is contained in:
Liang Ding 2023-04-25 18:34:38 +08:00
parent 125700d075
commit 40d952e12d
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 7 additions and 1 deletions

View file

@ -1245,6 +1245,13 @@ func processSyncMergeResult(exit, byHand bool, start time.Time, mergeResult *dej
elapsed := time.Since(start)
go func() {
util.WaitForUILoaded()
if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container {
// 移动端不推送差异详情
upsertRootIDs = []string{}
removeRootIDs = []string{}
}
util.BroadcastByType("main", "syncMergeResult", 0, "",
map[string]interface{}{"upsertRootIDs": upsertRootIDs, "removeRootIDs": removeRootIDs})

View file

@ -45,7 +45,6 @@ var IsUILoaded = false
func WaitForUILoaded() {
for !IsUILoaded {
logging.LogInfof("waiting for UI loading...")
time.Sleep(200 * time.Millisecond)
}
}