Tweak automatic qr code view appearing
No files matched your search
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 48 KiB |
@@ -246,10 +246,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, MainAppDelegate{
|
||||
guard let transfer = self.activeIncomingTransfers[id] else { return }
|
||||
if let error = error {
|
||||
|
||||
let alert = NSAlert()
|
||||
alert.alertStyle = .critical
|
||||
|
||||
alert.messageText = String(format: NSLocalizedString("TransferError", value: "Failed to receive files from %@", comment: ""), arguments: [transfer.device.name])
|
||||
var description = ""
|
||||
|
||||
if let ne = (error as? NearbyError){
|
||||
@@ -269,7 +265,13 @@ class AppDelegate: NSObject, NSApplicationDelegate, MainAppDelegate{
|
||||
description = error.localizedDescription
|
||||
}
|
||||
|
||||
let alert = NSAlert()
|
||||
alert.alertStyle = .critical
|
||||
|
||||
alert.messageText = String(format: NSLocalizedString("TransferError", value: "Failed to receive files from %@", comment: ""), arguments: [transfer.device.name])
|
||||
alert.informativeText = description
|
||||
alert.addButton(withTitle: "TypeNotSupportedButton".localized())
|
||||
|
||||
let _ = alert.runModal()
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -783,7 +783,7 @@
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
SHARED_BUILD = 19;
|
||||
SHARED_BUILD = 20;
|
||||
SHARED_VERSION = 1.4.5;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
@@ -842,7 +842,7 @@
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = macosx;
|
||||
SHARED_BUILD = 19;
|
||||
SHARED_BUILD = 20;
|
||||
SHARED_VERSION = 1.4.5;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
|
||||
@@ -354,7 +354,6 @@ class ShareViewController: NSViewController, ShareExtensionDelegate{
|
||||
alert.informativeText = "TimeoutDescription".localized()
|
||||
alert.addButton(withTitle: "TimeoutButton".localized())
|
||||
|
||||
|
||||
alert.beginSheetModal(for: self.view.window!) { _ in }
|
||||
}
|
||||
}
|
||||
@@ -394,15 +393,20 @@ class ShareViewController: NSViewController, ShareExtensionDelegate{
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
|
||||
NearbyConnectionManager.shared.startDeviceDiscovery()
|
||||
self.isDiscovering = true
|
||||
self.scheduleAutomaticQrCodeView()
|
||||
}
|
||||
}
|
||||
else {
|
||||
log("Main app is already running")
|
||||
NearbyConnectionManager.shared.startDeviceDiscovery()
|
||||
self.isDiscovering = true
|
||||
self.scheduleAutomaticQrCodeView()
|
||||
}
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 3.0) {
|
||||
}
|
||||
|
||||
|
||||
private func scheduleAutomaticQrCodeView() {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) {
|
||||
if self.foundDevices.isEmpty {
|
||||
self.openQrCodeView()
|
||||
}
|
||||
|
||||