diff --git a/NetNewsWire/AppDelegate.swift b/NetNewsWire/AppDelegate.swift index cce9925f4..6c0806988 100644 --- a/NetNewsWire/AppDelegate.swift +++ b/NetNewsWire/AppDelegate.swift @@ -173,7 +173,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, } #endif - CrashReporter.check(appName: "NetNewsWire") + DispatchQueue.main.async { + CrashReporter.check(appName: "NetNewsWire") + } } func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool { diff --git a/NetNewsWire/CrashReporter/CrashReporter.swift b/NetNewsWire/CrashReporter/CrashReporter.swift index e91d7a112..be0a8b9f5 100644 --- a/NetNewsWire/CrashReporter/CrashReporter.swift +++ b/NetNewsWire/CrashReporter/CrashReporter.swift @@ -44,6 +44,8 @@ struct CrashReporter { static let sendCrashLogsAutomaticallyKey = "SendCrashLogsAutomatically" } + private static var crashReportWindowController: CrashReportWindowController? + /// Look in ~/Library/Logs/DiagnosticReports/ for a new crash log for this app. /// Show a crash log reporter window if found. static func check(appName: String) { @@ -112,9 +114,9 @@ struct CrashReporter { } static func runCrashReporterWindow(_ crashLog: CrashLog) { - // TODO + crashReportWindowController = CrashReportWindowController(crashLogText: crashLog.content) + crashReportWindowController!.showWindow(self) } - } private extension CrashReporter { diff --git a/NetNewsWire/CrashReporter/CrashReporterWindow.xib b/NetNewsWire/CrashReporter/CrashReporterWindow.xib index 1045eff9b..946c178b6 100644 --- a/NetNewsWire/CrashReporter/CrashReporterWindow.xib +++ b/NetNewsWire/CrashReporter/CrashReporterWindow.xib @@ -1,5 +1,5 @@ - + @@ -16,25 +16,26 @@ - + - + - - - + + - + + - + + To help us fix crashing bugs, click Send Crash Log. Below is the text that will be sent to Brent. No other information will be sent. @@ -42,9 +43,10 @@ - + - + + @@ -58,17 +60,16 @@ + - - - - - + + You can skip this window in the future by telling NetNewsWire to automatically send crash logs. You can also turn this setting on and off in the Preferences window, in the Advanced section. @@ -96,8 +98,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +