diff --git a/Mist/AppDelegate.swift b/Mist/AppDelegate.swift index 16c31e1..cdf339d 100644 --- a/Mist/AppDelegate.swift +++ b/Mist/AppDelegate.swift @@ -12,7 +12,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { // swiftlint:disable:next weak_delegate private let userNotificationCenterDelegate: UserNotificationCenterDelegate = .init() - func applicationDidFinishLaunching(_ notification: Notification) { + func applicationDidFinishLaunching(_: Notification) { UNUserNotificationCenter.current().delegate = userNotificationCenterDelegate let show: UNNotificationAction = .init(identifier: UNNotificationAction.Identifier.show, title: "Show", options: .foreground) let success: UNNotificationCategory = .init(identifier: UNNotificationCategory.Identifier.success, actions: [show], intentIdentifiers: [], options: []) @@ -22,7 +22,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { NSWindow.allowsAutomaticWindowTabbing = false } - func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + func applicationShouldTerminateAfterLastWindowClosed(_: NSApplication) -> Bool { true } diff --git a/Mist/UserNotificationCenterDelegate.swift b/Mist/UserNotificationCenterDelegate.swift index d06fd46..8b473a7 100644 --- a/Mist/UserNotificationCenterDelegate.swift +++ b/Mist/UserNotificationCenterDelegate.swift @@ -9,7 +9,7 @@ import AppKit import UserNotifications class UserNotificationCenterDelegate: NSObject, UNUserNotificationCenterDelegate { - func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse) async { + func userNotificationCenter(_: UNUserNotificationCenter, didReceive response: UNNotificationResponse) async { guard response.actionIdentifier == UNNotificationAction.Identifier.show, let string: String = response.notification.request.content.userInfo["URL"] as? String else { return diff --git a/Mist/Views/Components/PathControl.swift b/Mist/Views/Components/PathControl.swift index 32dad29..b1f8098 100644 --- a/Mist/Views/Components/PathControl.swift +++ b/Mist/Views/Components/PathControl.swift @@ -10,11 +10,11 @@ import SwiftUI struct PathControl: NSViewRepresentable { @Binding var path: String - func makeNSView(context: Context) -> NSPathControl { + func makeNSView(context _: Context) -> NSPathControl { NSPathControl() } - func updateNSView(_ nsView: NSPathControl, context: Context) { + func updateNSView(_ nsView: NSPathControl, context _: Context) { nsView.url = URL(fileURLWithPath: path) } }