mirror of
https://github.com/aculix/knotchy.git
synced 2026-10-27 07:15:53 +00:00
13 lines
439 B
Swift
13 lines
439 B
Swift
/// When the setup window opens by itself at launch.
|
|
public enum SetupLaunchRule {
|
|
public static let completedKey = "setupCompleted"
|
|
|
|
public static func shouldOpen(hostSupported: Bool, setupCompleted: Bool, runtime: RuntimeStatus) -> Bool {
|
|
guard hostSupported, setupCompleted else { return true }
|
|
switch runtime {
|
|
case .missing, .outdated: return true
|
|
case .current: return false
|
|
}
|
|
}
|
|
}
|