Better param name.

This commit is contained in:
Max Goedjen 2020-09-18 14:09:18 -07:00
parent 435a22754c
commit c644f5d4a3
No known key found for this signature in database
GPG Key ID: E58C21DD77B9B8E8
3 changed files with 4 additions and 4 deletions

View File

@ -11,8 +11,8 @@ public class Updater: ObservableObject, UpdaterProtocol {
@Published public var update: Release? @Published public var update: Release?
public init(hasRunSetup: Bool) { public init(checkOnLaunch: Bool) {
if hasRunSetup { if checkOnLaunch {
// Don't do a launch check if the user hasn't seen the setup prompt explaining updater yet. // Don't do a launch check if the user hasn't seen the setup prompt explaining updater yet.
checkForUpdates() checkForUpdates()
} }

View File

@ -14,7 +14,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
list.add(store: SmartCard.Store()) list.add(store: SmartCard.Store())
return list return list
}() }()
private let updater = Updater(hasRunSetup: false) private let updater = Updater(checkOnLaunch: false)
private let notifier = Notifier() private let notifier = Notifier()
private lazy var agent: Agent = { private lazy var agent: Agent = {
Agent(storeList: storeList, witness: notifier) Agent(storeList: storeList, witness: notifier)

View File

@ -23,7 +23,7 @@ struct AppDelegate: App {
WindowGroup { WindowGroup {
ContentView<Updater, AgentStatusChecker>(showingCreation: $showingCreation, runningSetup: $showingSetup) ContentView<Updater, AgentStatusChecker>(showingCreation: $showingCreation, runningSetup: $showingSetup)
.environmentObject(storeList) .environmentObject(storeList)
.environmentObject(Updater(hasRunSetup: hasRunSetup)) .environmentObject(Updater(checkOnLaunch: hasRunSetup))
.environmentObject(agentStatusChecker) .environmentObject(agentStatusChecker)
.sheet(isPresented: $showingSetup) { .sheet(isPresented: $showingSetup) {
SetupView { completed in SetupView { completed in