mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
🎨 Reset doc browsing position after data snapshot rollback https://github.com/siyuan-note/siyuan/issues/8231
This commit is contained in:
parent
8f2144b9df
commit
7a68c8ad1b
2 changed files with 10 additions and 1 deletions
|
|
@ -567,7 +567,9 @@ func checkoutRepo(id string) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
FullReindex()
|
task.AppendTask(task.DatabaseIndexFull, fullReindex)
|
||||||
|
task.AppendTask(task.DatabaseIndexRef, IndexRefs)
|
||||||
|
task.AppendTask(task.ReloadUI, util.ReloadUIResetScroll)
|
||||||
|
|
||||||
if syncEnabled {
|
if syncEnabled {
|
||||||
func() {
|
func() {
|
||||||
|
|
|
||||||
|
|
@ -120,8 +120,15 @@ func ClosePushChan(id string) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ReloadUIResetScroll() {
|
||||||
|
evt := NewCmdResult("reloadui", 0, PushModeBroadcast)
|
||||||
|
evt.Data = map[string]interface{}{"resetScroll": true}
|
||||||
|
PushEvent(evt)
|
||||||
|
}
|
||||||
|
|
||||||
func ReloadUI() {
|
func ReloadUI() {
|
||||||
evt := NewCmdResult("reloadui", 0, PushModeBroadcast)
|
evt := NewCmdResult("reloadui", 0, PushModeBroadcast)
|
||||||
|
evt.Data = map[string]interface{}{"dropCurrentLayout": false}
|
||||||
PushEvent(evt)
|
PushEvent(evt)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue