diff --git a/Color Picker/AppState.swift b/Color Picker/AppState.swift index 15fae35..b414633 100644 --- a/Color Picker/AppState.swift +++ b/Color Picker/AppState.swift @@ -97,7 +97,7 @@ final class AppState: ObservableObject { let item = $0 $0.button!.onAction { [self] event in - let isAlternative = event.isAlternateClickForStatusItem + let isAlternative = event.isAlternativeClickForStatusItem let showMenu = { item.showMenu(createMenu()) diff --git a/Color Picker/SettingsScreen.swift b/Color Picker/SettingsScreen.swift index 4a0ead3..5b9a604 100644 --- a/Color Picker/SettingsScreen.swift +++ b/Color Picker/SettingsScreen.swift @@ -91,6 +91,11 @@ private struct GeneralSettings: View { } .disabled(!showInMenuBar) .padding(.leading, 19) + Button("Feedback & Support") { + SSApp.openSendFeedbackPage() + } + .buttonStyle(.link) + .padding(.top) } } .padding() diff --git a/Color Picker/Utilities.swift b/Color Picker/Utilities.swift index 3d8c001..96c41d5 100644 --- a/Color Picker/Utilities.swift +++ b/Color Picker/Utilities.swift @@ -77,11 +77,16 @@ typealias XColor = UIColor #endif +//func delay(seconds: TimeInterval, closure: @escaping () -> Void) { +// Task.detached { +// try? await Task.sleep(seconds: seconds) +// closure() +// } +//} + +// TODO: Don't make this use `Task` for at least another two years (2024). There are a lot of things that don't work with `Task`. func delay(seconds: TimeInterval, closure: @escaping () -> Void) { - Task.detached { - try? await Task.sleep(seconds: seconds) - closure() - } + DispatchQueue.main.asyncAfter(deadline: .now() + seconds, execute: closure) } @@ -2837,13 +2842,13 @@ extension NSEvent { extension NSEvent { - var isAlternateMouseUp: Bool { + var isAlternativeMouseUp: Bool { type == .rightMouseUp || (type == .leftMouseUp && modifiers == .control) } - var isAlternateClickForStatusItem: Bool { - isAlternateMouseUp + var isAlternativeClickForStatusItem: Bool { + isAlternativeMouseUp || (type == .leftMouseUp && modifiers == .option) } }