import Foundation /// Whether Redline installs a staged update by itself. /// /// On by default: updates download in the background and install the next time the app /// has nothing unsent, so the tool stays current without anyone chasing a menu row. /// Off means the staged update waits for the "Update to X" action. public enum UpdateSettings { public static let autoInstallKey = "ai.flowmaster.shotdeck.autoInstallUpdates" public static func autoInstall(defaults: UserDefaults = .standard) -> Bool { guard defaults.object(forKey: autoInstallKey) != nil else { return true } return defaults.bool(forKey: autoInstallKey) } public static func setAutoInstall(_ value: Bool, defaults: UserDefaults = .standard) { defaults.set(value, forKey: autoInstallKey) } }