From 11e8fdecf80340da39929fd9a79afb7e1f5f0b50 Mon Sep 17 00:00:00 2001 From: Matt Kiazyk Date: Thu, 29 Apr 2021 17:04:38 -0500 Subject: [PATCH] Adds a settings button that loads MacOS Notification when user denies access --- Xcodes/Frontend/Preferences/NotificationsView.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Xcodes/Frontend/Preferences/NotificationsView.swift b/Xcodes/Frontend/Preferences/NotificationsView.swift index fe1bbf8..257ab2b 100644 --- a/Xcodes/Frontend/Preferences/NotificationsView.swift +++ b/Xcodes/Frontend/Preferences/NotificationsView.swift @@ -11,8 +11,11 @@ struct NotificationsView: View { Text("Access Granted. You will receive notifications from Xcodes.") .fixedSize(horizontal: false, vertical: true) case .shownAndDenied: - Text("⚠️ Access Denied ⚠️\n\nPlease open your Notification Settings if you wish to allow access.") + Text("⚠️ Access Denied ⚠️\n\nPlease open your Notification Settings and select Xcodes if you wish to allow access.") .fixedSize(horizontal: false, vertical: true) + Button("Notification Settings", action: { + NSWorkspace.shared.open(URL(string: "x-apple.systempreferences:com.apple.preference.notifications")!) + }) default: Button("Enable Notifications", action: {