mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +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) {
|
func unmount0(boxID string) {
|
||||||
for _, box := range Conf.GetOpenedBoxes() {
|
box := Conf.Box(boxID)
|
||||||
if box.ID == boxID {
|
if nil == box {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
boxConf := box.GetConf()
|
boxConf := box.GetConf()
|
||||||
boxConf.Closed = true
|
boxConf.Closed = true
|
||||||
box.SaveConf(boxConf)
|
box.SaveConf(boxConf)
|
||||||
box.Unindex()
|
box.Unindex()
|
||||||
debug.FreeOSMemory()
|
debug.FreeOSMemory()
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func Mount(boxID string) (alreadyMount bool, err error) {
|
func Mount(boxID string) (alreadyMount bool, err error) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue