From e107130a4850943dd4d5a8945c3da5749446cc0b Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 6 Apr 2023 22:41:02 +0800 Subject: [PATCH] :art: Show changelog after upgrading https://github.com/siyuan-note/siyuan/issues/7902 --- kernel/api/system.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/kernel/api/system.go b/kernel/api/system.go index b9f5f7a55..67a8a6691 100644 --- a/kernel/api/system.go +++ b/kernel/api/system.go @@ -45,16 +45,13 @@ func getChangelog(c *gin.Context) { return } - //if !model.Conf.ShowChangelog { - // return - //} + if !model.Conf.ShowChangelog { + return + } - ver := util.Ver - ver = "2.8.4" - - changelogPath := filepath.Join(changelogsDir, "v"+ver+"_"+model.Conf.Lang+".md") + changelogPath := filepath.Join(changelogsDir, "v"+util.Ver+"_"+model.Conf.Lang+".md") if !gulu.File.IsExist(changelogPath) { - changelogPath = filepath.Join(changelogsDir, "v"+ver+".md") + changelogPath = filepath.Join(changelogsDir, "v"+util.Ver+".md") if !gulu.File.IsExist(changelogPath) { logging.LogErrorf("changelog not found: %s", changelogPath) return