🐛 The insertion position is wrong after converting the list to paragraph block in the floating window https://github.com/siyuan-note/siyuan/issues/15396

This commit is contained in:
Daniel 2025-08-01 22:52:16 +08:00
parent be684aee76
commit 561d4cc891
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 4 additions and 4 deletions

View file

@ -86,7 +86,7 @@ func getBlockSiblingID(c *gin.Context) {
} }
} }
func getBlockIDs(c *gin.Context) { func getBlockRelevantIDs(c *gin.Context) {
ret := gulu.Ret.NewResult() ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret) defer c.JSON(http.StatusOK, ret)
@ -96,7 +96,7 @@ func getBlockIDs(c *gin.Context) {
} }
id := arg["id"].(string) id := arg["id"].(string)
parentID, previousID, nextID, err := model.GetBlockIDs(id) parentID, previousID, nextID, err := model.GetBlockRelevantIDs(id)
if nil != err { if nil != err {
ret.Code = -1 ret.Code = -1
ret.Msg = err.Error() ret.Msg = err.Error()

View file

@ -217,7 +217,7 @@ func ServeAPI(ginServer *gin.Engine) {
ginServer.Handle("POST", "/api/block/swapBlockRef", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, swapBlockRef) ginServer.Handle("POST", "/api/block/swapBlockRef", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, swapBlockRef)
ginServer.Handle("POST", "/api/block/transferBlockRef", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, transferBlockRef) ginServer.Handle("POST", "/api/block/transferBlockRef", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, transferBlockRef)
ginServer.Handle("POST", "/api/block/getBlockSiblingID", model.CheckAuth, getBlockSiblingID) ginServer.Handle("POST", "/api/block/getBlockSiblingID", model.CheckAuth, getBlockSiblingID)
ginServer.Handle("POST", "/api/block/getBlockIDs", model.CheckAuth, getBlockIDs) ginServer.Handle("POST", "/api/block/getBlockRelevantIDs", model.CheckAuth, getBlockRelevantIDs)
ginServer.Handle("POST", "/api/block/getBlockTreeInfos", model.CheckAuth, getBlockTreeInfos) ginServer.Handle("POST", "/api/block/getBlockTreeInfos", model.CheckAuth, getBlockTreeInfos)
ginServer.Handle("POST", "/api/block/checkBlockRef", model.CheckAuth, checkBlockRef) ginServer.Handle("POST", "/api/block/checkBlockRef", model.CheckAuth, checkBlockRef)

View file

@ -280,7 +280,7 @@ func GetBlockSiblingID(id string) (parent, previous, next string) {
return return
} }
func GetBlockIDs(id string) (parentID, previousID, nextID string, err error) { func GetBlockRelevantIDs(id string) (parentID, previousID, nextID string, err error) {
tree, err := LoadTreeByBlockID(id) tree, err := LoadTreeByBlockID(id)
if err != nil { if err != nil {
return return