🎨 更新版本后自动打开用户指南 Fix https://github.com/siyuan-note/siyuan/issues/7469

This commit is contained in:
Liang Ding 2023-02-24 12:49:49 +08:00
parent 1069d245af
commit 0b7598df3b
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
6 changed files with 8 additions and 10 deletions

View file

@ -70,7 +70,7 @@ type AppConf struct {
Stat *conf.Stat `json:"stat"` // 统计
Api *conf.API `json:"api"` // API
Repo *conf.Repo `json:"repo"` // 数据仓库
Newbie bool `json:"newbie"` // 是否是安装后第一次启动
OpenHelp bool `json:"openHelp"` // 启动后是否需要打开用户指南
}
func InitConf() {
@ -211,7 +211,9 @@ func InitConf() {
}
if nil == Conf.System {
Conf.System = conf.NewSystem()
Conf.OpenHelp = true
} else {
Conf.OpenHelp = Conf.System.KernelVersion != util.Ver
Conf.System.KernelVersion = util.Ver
Conf.System.IsInsider = util.IsInsider
}
@ -237,7 +239,6 @@ func InitConf() {
}
Conf.System.OS = runtime.GOOS
Conf.System.OSPlatform, _ = util.GetOSPlatform()
Conf.Newbie = util.IsNewbie
if "" != Conf.UserData {
Conf.User = loadUserFromConf()

View file

@ -162,8 +162,8 @@ func Mount(boxID string) (alreadyMount bool, err error) {
box.SaveConf(boxConf)
}
if Conf.Newbie {
Conf.Newbie = false
if Conf.OpenHelp {
Conf.OpenHelp = false
Conf.Save()
}