Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
tattn committed Apr 24, 2022
1 parent 3fa20ce commit 4ec953d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/xcode/Sources/VCamData/UserDefaultsKey.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ import VCamEntity

public extension UserDefaults.Key {
typealias Key = UserDefaults.Key
static var skipThisVersion: Key<Version> { .init("vc_skip_version", default: "") }
static var skipThisVersion: Key<Version> { .init("vc_skip_version", default: "0.0.0") }
}
2 changes: 1 addition & 1 deletion app/xcode/Sources/VCamUI/AppUpdater+UI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ extension AppUpdater {

@MainActor
public func presentUpdateAlertIfAvailable() async {
guard let release = try? await check(), UserDefaults.standard.value(for: .skipThisVersion) != release.version else {
guard let release = try? await check(), UserDefaults.standard.value(for: .skipThisVersion) < release.version else {
return // already latest or error
}
presentWindow(title: L10n.update.text, id: nil, size: .init(width: 600, height: 400)) { window in
Expand Down

0 comments on commit 4ec953d

Please sign in to comment.