🎨 重构关闭笔记本

This commit is contained in:
Liang Ding 2023-01-15 14:00:01 +08:00
parent 10c810a02c
commit 0f82fb3fce
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -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) {