mirror of
https://github.com/siyuan-note/siyuan
synced 2026-04-21 13:37:52 +00:00
🎨 Refresh block updated time when updating task list item marker (#17529)
* 🐛 Refresh block updated time when updating task list item marker via API * ♻️ Refactor task list item marker update operations for improved clarity and efficiency
This commit is contained in:
parent
21ff9ecf5f
commit
e9f92d2a06
1 changed files with 4 additions and 10 deletions
|
|
@ -73,6 +73,8 @@ func buildUpdatedTaskListItemBlockDOM(id, marker string, luteEngine *lute.Lute)
|
|||
markerNode.TaskListItemMarker = liMarker
|
||||
markerNode.TaskListItemChecked = ' ' != markerNode.TaskListItemMarker
|
||||
|
||||
li.SetIALAttr("updated", util.CurrentTimeSecondsStr())
|
||||
|
||||
return luteEngine.RenderNodeBlockDOM(li), nil
|
||||
}
|
||||
|
||||
|
|
@ -107,11 +109,7 @@ func updateTaskListItemMarker(c *gin.Context) {
|
|||
transactions := []*model.Transaction{
|
||||
{
|
||||
DoOperations: []*model.Operation{
|
||||
{
|
||||
Action: "update",
|
||||
ID: id,
|
||||
Data: data,
|
||||
},
|
||||
{Action: "update", ID: id, Data: data},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -172,11 +170,7 @@ func batchUpdateTaskListItemMarker(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
ops = append(ops, &model.Operation{
|
||||
Action: "update",
|
||||
ID: id,
|
||||
Data: data,
|
||||
})
|
||||
ops = append(ops, &model.Operation{Action: "update", ID: id, Data: data})
|
||||
}
|
||||
|
||||
tx := &model.Transaction{DoOperations: ops}
|
||||
|
|
|
|||
Loading…
Reference in a new issue