mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-07 03:50:08 +02:00
🐛 Fix user initiated issue
This commit is contained in:
@ -14,10 +14,10 @@ class AppUpdater {
|
||||
var latestVersionOnline: AppVersion!
|
||||
var interactive: Bool = false
|
||||
|
||||
public func checkForUpdates(interactive: Bool) async {
|
||||
self.interactive = interactive
|
||||
public func checkForUpdates(userInitiated: Bool) async {
|
||||
self.interactive = userInitiated
|
||||
|
||||
if interactive && !Preferences.isEnabled(.automaticBackgroundUpdateCheck) {
|
||||
if !interactive && !Preferences.isEnabled(.automaticBackgroundUpdateCheck) {
|
||||
Log.info("Skipping automatic update check due to user preference.")
|
||||
return
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ extension MainMenu {
|
||||
OnboardingWindowController.show()
|
||||
}
|
||||
} else {
|
||||
await AppUpdater().checkForUpdates(interactive: false)
|
||||
await AppUpdater().checkForUpdates(userInitiated: false)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ class MainMenu: NSObject, NSWindowDelegate, NSMenuDelegate, PhpSwitcherDelegate
|
||||
}
|
||||
|
||||
@objc func checkForUpdates() {
|
||||
Task { await AppUpdater().checkForUpdates(interactive: true) }
|
||||
Task { await AppUpdater().checkForUpdates(userInitiated: true) }
|
||||
}
|
||||
|
||||
// MARK: - Menu Delegate
|
||||
|
@ -48,7 +48,7 @@ class OnboardingWindowController: PMWindowController {
|
||||
|
||||
// Search for updates after closing the window
|
||||
if Stats.successfulLaunchCount == 1 {
|
||||
Task { await AppUpdater().checkForUpdates(interactive: false) }
|
||||
Task { await AppUpdater().checkForUpdates(userInitiated: false) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user