fix: 修复版本日志弹窗逻辑错误

This commit is contained in:
digua committed 2026-01-28 01:34:12 +08:00
1 parent f7528521d6
commit e6885c95dd
2 files changed
+8 -2

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
{
"version": "0.9.0",
"date": "2026-01-28",
"summary": "支持了 NLP 分词能力,语录 Tab 下新增词云;新增视图功能,支持展示更多图表;支持了系统代理跟随;优化了部分页面和样式。<br/>更多详见<a href='https://baidu.com' target='_blank'>小红书</a>",
"summary": "支持了 NLP 分词能力,语录 Tab 下新增词云;新增视图功能,支持展示更多图表;支持了系统代理跟随;优化了部分页面和样式。",
"changes": [
{
"type": "feat",
+7 -1
View File
@@ -194,9 +194,15 @@ async function checkNewVersion() {
if (!result.success || !result.data) return
const data = result.data as ChangelogItem[]
const latestChangelogVersion = data[0]?.version
const latestChangelogVersion = normalizeVersion(data[0]?.version)
if (!latestChangelogVersion) return
// 仅当“当前版本就是最新版本”时才弹窗
// 避免当前版本较旧时(存在更高版本日志)也弹出阅读
if (currentVersion !== latestChangelogVersion) {
return
}
// 5. 在 changelog 中查找当前软件版本
const currentVersionExists = data.some((log) => normalizeVersion(log.version) === currentVersion)