mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 08:30:12 +01:00
🎨 Creating a dailynote existed no longer expands the doc tree https://github.com/siyuan-note/siyuan/issues/9959
This commit is contained in:
parent
ad6edcae03
commit
6adc275cc8
1 changed files with 21 additions and 22 deletions
|
|
@ -472,18 +472,16 @@ func createDailyNote(c *gin.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !existed {
|
||||||
|
// 只有创建的情况才推送,已经存在的情况不推送
|
||||||
|
// Creating a dailynote no longer expands the doc tree https://github.com/siyuan-note/siyuan/issues/9959
|
||||||
appArg := arg["app"]
|
appArg := arg["app"]
|
||||||
app := ""
|
app := ""
|
||||||
if nil != appArg {
|
if nil != appArg {
|
||||||
app = appArg.(string)
|
app = appArg.(string)
|
||||||
}
|
}
|
||||||
pushMode := util.PushModeBroadcast
|
evt := util.NewCmdResult("createdailynote", 0, util.PushModeBroadcast)
|
||||||
if existed && "" != app {
|
|
||||||
pushMode = util.PushModeBroadcastApp
|
|
||||||
}
|
|
||||||
evt := util.NewCmdResult("createdailynote", 0, pushMode)
|
|
||||||
evt.AppId = app
|
evt.AppId = app
|
||||||
|
|
||||||
name := path.Base(p)
|
name := path.Base(p)
|
||||||
files, _, _ := model.ListDocTree(box.ID, path.Dir(p), util.SortModeUnassigned, false, false, model.Conf.FileTree.MaxListCount)
|
files, _, _ := model.ListDocTree(box.ID, path.Dir(p), util.SortModeUnassigned, false, false, model.Conf.FileTree.MaxListCount)
|
||||||
evt.Data = map[string]interface{}{
|
evt.Data = map[string]interface{}{
|
||||||
|
|
@ -495,6 +493,7 @@ func createDailyNote(c *gin.Context) {
|
||||||
}
|
}
|
||||||
evt.Callback = arg["callback"]
|
evt.Callback = arg["callback"]
|
||||||
util.PushEvent(evt)
|
util.PushEvent(evt)
|
||||||
|
}
|
||||||
|
|
||||||
ret.Data = map[string]interface{}{
|
ret.Data = map[string]interface{}{
|
||||||
"id": tree.Root.ID,
|
"id": tree.Root.ID,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue