mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-08-21 06:24:32 +00:00
fix(menubar): re-check CLI version on every update cycle
This commit is contained in:
parent
af99516633
commit
11b3e1be58
1 changed files with 2 additions and 6 deletions
|
|
@ -63,9 +63,7 @@ final class UpdateChecker {
|
|||
}
|
||||
|
||||
func checkIfNeeded() async {
|
||||
if installedCliVersion == nil {
|
||||
installedCliVersion = Self.queryInstalledCliVersion()
|
||||
}
|
||||
installedCliVersion = Self.queryInstalledCliVersion()
|
||||
let lastCheck = UserDefaults.standard.double(forKey: lastCheckKey)
|
||||
let now = Date().timeIntervalSince1970
|
||||
if now - lastCheck < checkIntervalSeconds {
|
||||
|
|
@ -78,9 +76,7 @@ final class UpdateChecker {
|
|||
|
||||
func check() async {
|
||||
updateError = nil
|
||||
if installedCliVersion == nil {
|
||||
installedCliVersion = Self.queryInstalledCliVersion()
|
||||
}
|
||||
installedCliVersion = Self.queryInstalledCliVersion()
|
||||
guard let url = URL(string: releasesAPI) else { return }
|
||||
var request = URLRequest(url: url)
|
||||
request.timeoutInterval = 30
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue