mirror of
https://github.com/bitgapp/eqMac.git
synced 2024-11-26 07:57:13 +03:00
skipping update check if cannot access internet
This commit is contained in:
parent
32c59090dc
commit
36549aac43
@ -17,14 +17,19 @@ class AppDelegate: NSObject, NSApplicationDelegate, SUUpdaterDelegate {
|
||||
var updater = SUUpdater(for: Bundle.main)!
|
||||
var updateProcessed = EmitterKit.Event<Void>()
|
||||
var willBeDownloadingUpdate = false
|
||||
var applicationStarted = false
|
||||
|
||||
func applicationDidFinishLaunching(_ aNotification: Notification) {
|
||||
NSApplication.shared.windows.first?.close()
|
||||
updater.delegate = self
|
||||
updateProcessed.once { _ in
|
||||
self.applicationStarted = true
|
||||
Application.start()
|
||||
}
|
||||
updater.checkForUpdatesInBackground()
|
||||
Utilities.delay(2000) {
|
||||
self.updateProcessed.emit()
|
||||
}
|
||||
}
|
||||
|
||||
func applicationWillTerminate(_ aNotification: Notification) {
|
||||
|
@ -34,7 +34,9 @@ class InputSource {
|
||||
|
||||
static func requestPermission (_ callback: @escaping (Bool) -> Void) {
|
||||
if #available(OSX 10.14, *) {
|
||||
AVCaptureDevice.requestAccess(for: AVMediaType.audio, completionHandler: callback)
|
||||
AVCaptureDevice.requestAccess(for: AVMediaType.audio) { granted in
|
||||
callback(granted)
|
||||
}
|
||||
} else {
|
||||
callback(true)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user