Skip to content

Commit

Permalink
chore: remind me next time
Browse files Browse the repository at this point in the history
  • Loading branch information
hstyi committed Feb 26, 2025
1 parent b5c30d5 commit 7acbdcc
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 17 deletions.
9 changes: 0 additions & 9 deletions src/main/kotlin/app/termora/UpdaterManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class UpdaterManager private constructor() {
val isSelf get() = this == self
}

private val properties get() = Database.getDatabase().properties
var lastVersion = LatestVersion.self

fun fetchLatestVersion(): LatestVersion {
Expand Down Expand Up @@ -146,12 +145,4 @@ class UpdaterManager private constructor() {
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")
}
}
5 changes: 0 additions & 5 deletions src/main/kotlin/app/termora/actions/AppUpdateAction.kt
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ class AppUpdateAction private constructor() : AnAction(
return
}

if (updaterManager.isIgnored(latestVersion.version)) {
return
}

try {
downloadLatestPkg(latestVersion)
} catch (e: Exception) {
Expand Down Expand Up @@ -194,7 +190,6 @@ class AppUpdateAction private constructor() : AnAction(
return
} else if (option == JOptionPane.NO_OPTION) {
isEnabled = false
updaterManager.ignore(lastVersion.version)
} else if (option == JOptionPane.YES_OPTION) {
updateSelf(lastVersion)
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ termora.quit-confirm=Quit {0}?
# update
termora.update.title=New version
termora.update.update=Update
termora.update.ignore=Ignore this version
termora.update.ignore=Remind me next time

# Doorman
termora.doorman.safe=Data is encrypted
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/i18n/messages_zh_CN.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ termora.quit-confirm=你要退出 {0} 吗?
# update
termora.update.title=新版本
termora.update.update=更新
termora.update.ignore=忽略这个版本
termora.update.ignore=下次提醒我

# Doorman
termora.doorman.safe=数据已加密
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/i18n/messages_zh_TW.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ termora.quit-confirm=你要退出 {0} 嗎?
# update
termora.update.title=新版本
termora.update.update=更新
termora.update.ignore=忽略這個版本
termora.update.ignore=下次提醒我



Expand Down

0 comments on commit 7acbdcc

Please sign in to comment.