Skip to content

Commit 36549aa

Browse files
committed
skipping update check if cannot access internet
1 parent 32c5909 commit 36549aa

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

native/app/Source/AppDelegate.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,19 @@ class AppDelegate: NSObject, NSApplicationDelegate, SUUpdaterDelegate {
1717
var updater = SUUpdater(for: Bundle.main)!
1818
var updateProcessed = EmitterKit.Event<Void>()
1919
var willBeDownloadingUpdate = false
20+
var applicationStarted = false
2021

2122
func applicationDidFinishLaunching(_ aNotification: Notification) {
2223
NSApplication.shared.windows.first?.close()
2324
updater.delegate = self
2425
updateProcessed.once { _ in
26+
self.applicationStarted = true
2527
Application.start()
2628
}
2729
updater.checkForUpdatesInBackground()
30+
Utilities.delay(2000) {
31+
self.updateProcessed.emit()
32+
}
2833
}
2934

3035
func applicationWillTerminate(_ aNotification: Notification) {

native/app/Source/Audio/Sources/Input/InputSource.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ class InputSource {
3434

3535
static func requestPermission (_ callback: @escaping (Bool) -> Void) {
3636
if #available(OSX 10.14, *) {
37-
AVCaptureDevice.requestAccess(for: AVMediaType.audio, completionHandler: callback)
37+
AVCaptureDevice.requestAccess(for: AVMediaType.audio) { granted in
38+
callback(granted)
39+
}
3840
} else {
3941
callback(true)
4042
}

0 commit comments

Comments
 (0)