拓展类型
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/app"
|
||||
"fyne.io/fyne/v2/container"
|
||||
@@ -12,6 +11,7 @@ import (
|
||||
"work_cation/views"
|
||||
)
|
||||
|
||||
// 本地缓存 上次打开目录
|
||||
const preferenceCurrentTutorial = "currentTutorial"
|
||||
|
||||
func main() {
|
||||
@@ -102,13 +102,14 @@ func makeNav(setTutorial func(tutorial views.Tutorial), loadPrevious bool) fyne.
|
||||
if unsupportedTutorial(t) {
|
||||
return
|
||||
}
|
||||
// 存储默认打开
|
||||
a.Preferences().SetString(preferenceCurrentTutorial, uid)
|
||||
fmt.Println(t)
|
||||
setTutorial(t)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
// 读取存储默认打开
|
||||
if loadPrevious {
|
||||
currentPref := a.Preferences().StringWithFallback(preferenceCurrentTutorial, "welcome")
|
||||
tree.Select(currentPref)
|
||||
|
||||
Reference in New Issue
Block a user