mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 重构关闭笔记本
This commit is contained in:
parent
10c810a02c
commit
0f82fb3fce
1 changed files with 9 additions and 9 deletions
|
|
@ -123,16 +123,16 @@ func Unmount(boxID string) {
|
|||
}
|
||||
|
||||
func unmount0(boxID string) {
|
||||
for _, box := range Conf.GetOpenedBoxes() {
|
||||
if box.ID == boxID {
|
||||
boxConf := box.GetConf()
|
||||
boxConf.Closed = true
|
||||
box.SaveConf(boxConf)
|
||||
box.Unindex()
|
||||
debug.FreeOSMemory()
|
||||
return
|
||||
}
|
||||
box := Conf.Box(boxID)
|
||||
if nil == box {
|
||||
return
|
||||
}
|
||||
|
||||
boxConf := box.GetConf()
|
||||
boxConf.Closed = true
|
||||
box.SaveConf(boxConf)
|
||||
box.Unindex()
|
||||
debug.FreeOSMemory()
|
||||
}
|
||||
|
||||
func Mount(boxID string) (alreadyMount bool, err error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue