mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-10 17:24:21 +01:00
🎨 Alt+5 打开已有日记时不在内核伺服客户端之间同步 Fix https://github.com/siyuan-note/siyuan/issues/5617
This commit is contained in:
parent
9fb4d9da2a
commit
8ac1104d6f
5 changed files with 41 additions and 11 deletions
|
|
@ -405,7 +405,7 @@ func createDailyNote(c *gin.Context) {
|
|||
}
|
||||
|
||||
notebook := arg["notebook"].(string)
|
||||
p, err := model.CreateDailyNote(notebook)
|
||||
p, existed, err := model.CreateDailyNote(notebook)
|
||||
if nil != err {
|
||||
if model.ErrBoxNotFound == err {
|
||||
ret.Code = 1
|
||||
|
|
@ -425,7 +425,18 @@ func createDailyNote(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
evt := util.NewCmdResult("createdailynote", 0, util.PushModeBroadcast, util.PushModeNone)
|
||||
appArg := arg["app"]
|
||||
app := ""
|
||||
if nil != appArg {
|
||||
app = appArg.(string)
|
||||
}
|
||||
pushMode := util.PushModeBroadcast
|
||||
if existed && "" != app {
|
||||
pushMode = util.PushModeBroadcastApp
|
||||
}
|
||||
evt := util.NewCmdResult("createdailynote", 0, pushMode, util.PushModeNone)
|
||||
evt.AppId = app
|
||||
|
||||
name := path.Base(p)
|
||||
files, _, _ := model.ListDocTree(box.ID, path.Dir(p), model.Conf.FileTree.Sort)
|
||||
evt.Data = map[string]interface{}{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue