mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
🐛 Close user guide when exiting https://ld246.com/article/1708782043043
This commit is contained in:
parent
671667981d
commit
1f22ee3d7e
1 changed files with 9 additions and 0 deletions
|
|
@ -1011,11 +1011,20 @@ func closeUserGuide() {
|
|||
}
|
||||
|
||||
msgId := util.PushMsg(Conf.language(233), 30000)
|
||||
evt := util.NewCmdResult("unmount", 0, util.PushModeBroadcast)
|
||||
evt.Data = map[string]interface{}{
|
||||
"box": boxID,
|
||||
}
|
||||
util.PushEvent(evt)
|
||||
|
||||
unindex(boxID)
|
||||
|
||||
if removeErr := filelock.Remove(boxDirPath); nil != removeErr {
|
||||
logging.LogErrorf("remove corrupted user guide box [%s] failed: %s", boxDirPath, removeErr)
|
||||
}
|
||||
|
||||
sql.WaitForWritingDatabase()
|
||||
|
||||
util.PushClearMsg(msgId)
|
||||
logging.LogInfof("closed user guide box [%s]", boxID)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue