From b4ce1eb460dcc2f441a02695da6928d65fb252b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E5=AE=87=E8=88=AA?= Date: Sun, 16 Jul 2017 21:23:57 +0800 Subject: [PATCH] update subscribe at launch --- ShadowsocksX-NG/AppDelegate.swift | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ShadowsocksX-NG/AppDelegate.swift b/ShadowsocksX-NG/AppDelegate.swift index 2456cdb..fec8109 100644 --- a/ShadowsocksX-NG/AppDelegate.swift +++ b/ShadowsocksX-NG/AppDelegate.swift @@ -204,9 +204,18 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele if defaults.bool(forKey: "ConnectAtLaunch") { toggleRunning(toggleRunningMenuItem) } - // Version Check! - if defaults.bool(forKey: "AutoCheckUpdate"){ - checkForUpdate(mustShowAlert: false) + + DispatchQueue.global().async { + // Version Check! + if defaults.bool(forKey: "AutoCheckUpdate"){ + self.checkForUpdate(mustShowAlert: false) + } + if defaults.bool(forKey: "AutoUpdateSubscribe") { + SubscribeManager.instance.updateAllServerFromSubscribe() + } + DispatchQueue.main.async { + + } } }