mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 Add parameter reloadUI for kernel API /api/block/transferBlockRef https://github.com/siyuan-note/siyuan/issues/10456
This commit is contained in:
@@ -62,6 +62,11 @@ func transferBlockRef(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
reloadUI := true
|
||||
if nil != arg["reloadUI"] {
|
||||
reloadUI = arg["reloadUI"].(bool)
|
||||
}
|
||||
|
||||
var refIDs []string
|
||||
if nil != arg["refIDs"] {
|
||||
for _, refID := range arg["refIDs"].([]interface{}) {
|
||||
@@ -76,6 +81,10 @@ func transferBlockRef(c *gin.Context) {
|
||||
ret.Data = map[string]interface{}{"closeTimeout": 7000}
|
||||
return
|
||||
}
|
||||
|
||||
if reloadUI {
|
||||
util.ReloadUI()
|
||||
}
|
||||
}
|
||||
|
||||
func swapBlockRef(c *gin.Context) {
|
||||
|
||||
@@ -205,7 +205,6 @@ func TransferBlockRef(fromID, toID string, refIDs []string) (err error) {
|
||||
}
|
||||
|
||||
sql.WaitForWritingDatabase()
|
||||
util.ReloadUI()
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user