chore: remind me next time

This commit is contained in:
hstyi
2025-02-26 15:56:20 +08:00
committed by hstyi
parent b5c30d505b
commit dcc96358f6
5 changed files with 3 additions and 17 deletions

View File

@@ -60,7 +60,6 @@ class UpdaterManager private constructor() {
val isSelf get() = this == self val isSelf get() = this == self
} }
private val properties get() = Database.getDatabase().properties
var lastVersion = LatestVersion.self var lastVersion = LatestVersion.self
fun fetchLatestVersion(): LatestVersion { fun fetchLatestVersion(): LatestVersion {
@@ -146,12 +145,4 @@ class UpdaterManager private constructor() {
return LatestVersion.self return LatestVersion.self
} }
fun isIgnored(version: String): Boolean {
return properties.getString("ignored.version.$version", "false").toBoolean()
}
fun ignore(version: String) {
properties.putString("ignored.version.$version", "true")
}
} }

View File

@@ -82,10 +82,6 @@ class AppUpdateAction private constructor() : AnAction(
return return
} }
if (updaterManager.isIgnored(latestVersion.version)) {
return
}
try { try {
downloadLatestPkg(latestVersion) downloadLatestPkg(latestVersion)
} catch (e: Exception) { } catch (e: Exception) {
@@ -194,7 +190,6 @@ class AppUpdateAction private constructor() : AnAction(
return return
} else if (option == JOptionPane.NO_OPTION) { } else if (option == JOptionPane.NO_OPTION) {
isEnabled = false isEnabled = false
updaterManager.ignore(lastVersion.version)
} else if (option == JOptionPane.YES_OPTION) { } else if (option == JOptionPane.YES_OPTION) {
updateSelf(lastVersion) updateSelf(lastVersion)
} }

View File

@@ -17,7 +17,7 @@ termora.quit-confirm=Quit {0}?
# update # update
termora.update.title=New version termora.update.title=New version
termora.update.update=Update termora.update.update=Update
termora.update.ignore=Ignore this version termora.update.ignore=Remind me next time
# Doorman # Doorman
termora.doorman.safe=Data is encrypted termora.doorman.safe=Data is encrypted

View File

@@ -15,7 +15,7 @@ termora.quit-confirm=你要退出 {0} 吗?
# update # update
termora.update.title=新版本 termora.update.title=新版本
termora.update.update=更新 termora.update.update=更新
termora.update.ignore=忽略这个版本 termora.update.ignore=下次提醒我
# Doorman # Doorman
termora.doorman.safe=数据已加密 termora.doorman.safe=数据已加密

View File

@@ -14,7 +14,7 @@ termora.quit-confirm=你要退出 {0} 嗎?
# update # update
termora.update.title=新版本 termora.update.title=新版本
termora.update.update=更新 termora.update.update=更新
termora.update.ignore=忽略這個版本 termora.update.ignore=下次提醒我