mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-07 03:50:08 +02:00
👌 Fix Swift 5.10 concurrency warnings
This commit is contained in:
@ -23,12 +23,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
|
||||
*/
|
||||
let state: App
|
||||
|
||||
/**
|
||||
The MainMenu singleton is responsible for rendering the
|
||||
menu bar item and its menu, as well as its actions.
|
||||
*/
|
||||
let menu: MainMenu
|
||||
|
||||
/**
|
||||
The paths singleton that determines where Homebrew is installed,
|
||||
and where to look for binaries.
|
||||
@ -96,7 +90,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
|
||||
}
|
||||
|
||||
self.state = App.shared
|
||||
self.menu = MainMenu.shared
|
||||
self.paths = Paths.shared
|
||||
self.valet = Valet.shared
|
||||
self.brew = Brew.shared
|
||||
@ -132,7 +125,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
|
||||
setupNotifications()
|
||||
|
||||
Task { // Make sure the menu performs its initial checks
|
||||
await menu.startup()
|
||||
await MainMenu.shared.startup()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -242,7 +242,7 @@ extension StatusMenu {
|
||||
addLoadedPresets()
|
||||
}
|
||||
|
||||
private func addEmptyPresetHelp() {
|
||||
@MainActor private func addEmptyPresetHelp() {
|
||||
addItem(NSMenuItem(title: "mi_presets_title".localized, submenu: [
|
||||
NSMenuItem(title: "mi_no_presets".localized),
|
||||
NSMenuItem.separator(),
|
||||
@ -251,7 +251,7 @@ extension StatusMenu {
|
||||
], target: MainMenu.shared))
|
||||
}
|
||||
|
||||
private func addLoadedPresets() {
|
||||
@MainActor private func addLoadedPresets() {
|
||||
addItem(NSMenuItem(title: "mi_presets_title".localized, submenu: [
|
||||
NSMenuItem.separator(),
|
||||
HeaderView.asMenuItem(text: "mi_apply_presets_title".localized)
|
||||
@ -266,7 +266,7 @@ extension StatusMenu {
|
||||
|
||||
// MARK: - Xdebug
|
||||
|
||||
func addXdebugMenuItem() {
|
||||
@MainActor func addXdebugMenuItem() {
|
||||
if !Xdebug.enabled {
|
||||
addItem(NSMenuItem.separator())
|
||||
return
|
||||
@ -286,7 +286,7 @@ extension StatusMenu {
|
||||
|
||||
// MARK: - PHP Doctor
|
||||
|
||||
func addPhpDoctorMenuItem() {
|
||||
@MainActor func addPhpDoctorMenuItem() {
|
||||
if !Preferences.isEnabled(.showPhpDoctorSuggestions) ||
|
||||
!WarningManager.shared.hasWarnings() {
|
||||
return
|
||||
@ -302,7 +302,7 @@ extension StatusMenu {
|
||||
|
||||
// MARK: - First Aid & Services
|
||||
|
||||
func addFirstAidAndServicesMenuItems() {
|
||||
@MainActor func addFirstAidAndServicesMenuItems() {
|
||||
let services = NSMenuItem(title: "mi_other".localized)
|
||||
|
||||
var items: [NSMenuItem] = [
|
||||
@ -359,7 +359,7 @@ extension StatusMenu {
|
||||
|
||||
// MARK: - Other helper methods to generate menu items
|
||||
|
||||
func addExtensionItem(_ phpExtension: PhpExtension, _ shortcutKey: Int) {
|
||||
@MainActor func addExtensionItem(_ phpExtension: PhpExtension, _ shortcutKey: Int) {
|
||||
let keyEquivalent = shortcutKey < 9 ? "\(shortcutKey)" : ""
|
||||
|
||||
let menuItem = ExtensionMenuItem(
|
||||
|
Reference in New Issue
Block a user