mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-11 02:51:11 +00:00
Auto-close qr view
This commit is contained in:
1 parent
4a13fd049f
commit
eeedb06027
2 files changed
+8
-6
No files matched your search
@@ -109,7 +109,7 @@ Gw
|
||||
</connections>
|
||||
</button>
|
||||
<customView id="ACO-U2-AZj">
|
||||
<rect key="frame" x="0.0" y="51" width="404" height="146"/>
|
||||
<rect key="frame" x="0.0" y="48" width="404" height="146"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
</customView>
|
||||
</subviews>
|
||||
|
||||
@@ -111,6 +111,9 @@ class ShareViewController: NSViewController, ShareExtensionDelegate{
|
||||
}
|
||||
|
||||
override func viewWillDisappear() {
|
||||
|
||||
self.qrWindow?.close()
|
||||
|
||||
if chosenDevice==nil{
|
||||
NearbyConnectionManager.shared.stopDeviceDiscovery()
|
||||
}
|
||||
@@ -118,7 +121,10 @@ class ShareViewController: NSViewController, ShareExtensionDelegate{
|
||||
}
|
||||
|
||||
@IBAction func cancel(_ sender: AnyObject?) {
|
||||
if let device=chosenDevice{
|
||||
|
||||
self.qrWindow?.close()
|
||||
|
||||
if let device=chosenDevice{
|
||||
NearbyConnectionManager.shared.cancelOutgoingTransfer(id: device.id!)
|
||||
}
|
||||
let cancelError = NSError(domain: NSCocoaErrorDomain, code: NSUserCancelledError, userInfo: nil)
|
||||
@@ -141,10 +147,6 @@ class ShareViewController: NSViewController, ShareExtensionDelegate{
|
||||
defer: false
|
||||
)
|
||||
|
||||
qrWindow?.styleMask.insert(.fullSizeContentView)
|
||||
qrWindow?.titleVisibility = .hidden
|
||||
qrWindow?.titlebarAppearsTransparent = true
|
||||
|
||||
qrWindow?.center()
|
||||
qrWindow?.isReleasedWhenClosed = false
|
||||
qrWindow?.setFrameAutosaveName("QrCodeScreen")
|
||||
|
||||
Reference in new issue
Block a user