Updater improvements.

This commit is contained in:
Max Goedjen
2020-09-18 14:05:42 -07:00
parent 5601d7eab8
commit 435a22754c
3 changed files with 15 additions and 13 deletions

View File

@@ -11,8 +11,11 @@ public class Updater: ObservableObject, UpdaterProtocol {
@Published public var update: Release?
public init() {
checkForUpdates()
public init(hasRunSetup: Bool) {
if hasRunSetup {
// Don't do a launch check if the user hasn't seen the setup prompt explaining updater yet.
checkForUpdates()
}
let timer = Timer.scheduledTimer(withTimeInterval: 60*60*24, repeats: true) { _ in
self.checkForUpdates()
}