From 2ec56b52fd60cba7fc81a806ebf6f1df192c32d5 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sun, 5 Apr 2020 19:30:25 -0500 Subject: [PATCH] Remove broken code that was slowing down application quitting. --- Mac/AppDelegate.swift | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/Mac/AppDelegate.swift b/Mac/AppDelegate.swift index 96a278b52..09e6682ab 100644 --- a/Mac/AppDelegate.swift +++ b/Mac/AppDelegate.swift @@ -292,9 +292,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, } func applicationDidResignActive(_ notification: Notification) { - ArticleStringFormatter.emptyCaches() - saveState() } @@ -305,28 +303,16 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, func applicationWillTerminate(_ notification: Notification) { shuttingDown = true saveState() - - let group = DispatchGroup() - - group.enter() - AccountManager.shared.syncArticleStatusAll() { - group.leave() - } - - let timeout = DispatchTime.now() + .seconds(1) - _ = group.wait(timeout: timeout) } // MARK: Notifications @objc func unreadCountDidChange(_ note: Notification) { - if note.object is AccountManager { unreadCount = AccountManager.shared.unreadCount } } @objc func webFeedSettingDidChange(_ note: Notification) { - guard let feed = note.object as? WebFeed, let key = note.userInfo?[WebFeed.WebFeedSettingUserInfoKey] as? String else { return } @@ -336,7 +322,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, } @objc func inspectableObjectsDidChange(_ note: Notification) { - guard let inspectorWindowController = inspectorWindowController, inspectorWindowController.isOpen else { return }