mirror of
https://github.com/ninxsoft/Mist.git
synced 2025-06-02 16:19:53 -04:00
SwiftFormat unusedArguments
This commit is contained in:
parent
46d9bd7259
commit
c01ff511aa
3 changed files with 5 additions and 5 deletions
|
@ -12,7 +12,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||||
// swiftlint:disable:next weak_delegate
|
// swiftlint:disable:next weak_delegate
|
||||||
private let userNotificationCenterDelegate: UserNotificationCenterDelegate = .init()
|
private let userNotificationCenterDelegate: UserNotificationCenterDelegate = .init()
|
||||||
|
|
||||||
func applicationDidFinishLaunching(_ notification: Notification) {
|
func applicationDidFinishLaunching(_: Notification) {
|
||||||
UNUserNotificationCenter.current().delegate = userNotificationCenterDelegate
|
UNUserNotificationCenter.current().delegate = userNotificationCenterDelegate
|
||||||
let show: UNNotificationAction = .init(identifier: UNNotificationAction.Identifier.show, title: "Show", options: .foreground)
|
let show: UNNotificationAction = .init(identifier: UNNotificationAction.Identifier.show, title: "Show", options: .foreground)
|
||||||
let success: UNNotificationCategory = .init(identifier: UNNotificationCategory.Identifier.success, actions: [show], intentIdentifiers: [], options: [])
|
let success: UNNotificationCategory = .init(identifier: UNNotificationCategory.Identifier.success, actions: [show], intentIdentifiers: [], options: [])
|
||||||
|
@ -22,7 +22,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||||
NSWindow.allowsAutomaticWindowTabbing = false
|
NSWindow.allowsAutomaticWindowTabbing = false
|
||||||
}
|
}
|
||||||
|
|
||||||
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
func applicationShouldTerminateAfterLastWindowClosed(_: NSApplication) -> Bool {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import AppKit
|
||||||
import UserNotifications
|
import UserNotifications
|
||||||
|
|
||||||
class UserNotificationCenterDelegate: NSObject, UNUserNotificationCenterDelegate {
|
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,
|
guard response.actionIdentifier == UNNotificationAction.Identifier.show,
|
||||||
let string: String = response.notification.request.content.userInfo["URL"] as? String else {
|
let string: String = response.notification.request.content.userInfo["URL"] as? String else {
|
||||||
return
|
return
|
||||||
|
|
|
@ -10,11 +10,11 @@ import SwiftUI
|
||||||
struct PathControl: NSViewRepresentable {
|
struct PathControl: NSViewRepresentable {
|
||||||
@Binding var path: String
|
@Binding var path: String
|
||||||
|
|
||||||
func makeNSView(context: Context) -> NSPathControl {
|
func makeNSView(context _: Context) -> NSPathControl {
|
||||||
NSPathControl()
|
NSPathControl()
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateNSView(_ nsView: NSPathControl, context: Context) {
|
func updateNSView(_ nsView: NSPathControl, context _: Context) {
|
||||||
nsView.url = URL(fileURLWithPath: path)
|
nsView.url = URL(fileURLWithPath: path)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue