mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 Partially refresh the interface after data synchronization https://github.com/siyuan-note/siyuan/issues/8098
This commit is contained in:
parent
125700d075
commit
40d952e12d
2 changed files with 7 additions and 1 deletions
|
|
@ -1245,6 +1245,13 @@ func processSyncMergeResult(exit, byHand bool, start time.Time, mergeResult *dej
|
||||||
elapsed := time.Since(start)
|
elapsed := time.Since(start)
|
||||||
go func() {
|
go func() {
|
||||||
util.WaitForUILoaded()
|
util.WaitForUILoaded()
|
||||||
|
|
||||||
|
if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container {
|
||||||
|
// 移动端不推送差异详情
|
||||||
|
upsertRootIDs = []string{}
|
||||||
|
removeRootIDs = []string{}
|
||||||
|
}
|
||||||
|
|
||||||
util.BroadcastByType("main", "syncMergeResult", 0, "",
|
util.BroadcastByType("main", "syncMergeResult", 0, "",
|
||||||
map[string]interface{}{"upsertRootIDs": upsertRootIDs, "removeRootIDs": removeRootIDs})
|
map[string]interface{}{"upsertRootIDs": upsertRootIDs, "removeRootIDs": removeRootIDs})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,6 @@ var IsUILoaded = false
|
||||||
|
|
||||||
func WaitForUILoaded() {
|
func WaitForUILoaded() {
|
||||||
for !IsUILoaded {
|
for !IsUILoaded {
|
||||||
logging.LogInfof("waiting for UI loading...")
|
|
||||||
time.Sleep(200 * time.Millisecond)
|
time.Sleep(200 * time.Millisecond)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue