🎨 Reset doc browsing position after data snapshot rollback https://github.com/siyuan-note/siyuan/issues/8231

This commit is contained in:
Liang Ding 2023-05-11 15:29:13 +08:00
parent 9383c943b3
commit f570396fcd
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -121,15 +121,11 @@ func ClosePushChan(id string) {
} }
func ReloadUIResetScroll() { func ReloadUIResetScroll() {
evt := NewCmdResult("reloadui", 0, PushModeBroadcast) BroadcastByType("main", "reloadui", 0, "", map[string]interface{}{"resetScroll": true})
evt.Data = map[string]interface{}{"resetScroll": true}
PushEvent(evt)
} }
func ReloadUI() { func ReloadUI() {
evt := NewCmdResult("reloadui", 0, PushModeBroadcast) BroadcastByType("main", "reloadui", 0, "", nil)
evt.Data = map[string]interface{}{"dropCurrentLayout": false}
PushEvent(evt)
} }
func PushTxErr(msg string, code int, data interface{}) { func PushTxErr(msg string, code int, data interface{}) {