mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-21 22:05:59 +00:00
Remove unused code
This commit is contained in:
1 parent
8e4989e163
commit
955763c004
2 files changed
+1
-10
No files matched your search
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// QrCodeVIew.swift
|
// QrCodeView.swift
|
||||||
// QuickDrop
|
// QuickDrop
|
||||||
//
|
//
|
||||||
// Created by Leon Böttger on 10.03.25.
|
// Created by Leon Böttger on 10.03.25.
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ class ShareViewController: NSViewController, ShareExtensionDelegate{
|
|||||||
private var foundDevices:[RemoteDeviceInfo]=[]
|
private var foundDevices:[RemoteDeviceInfo]=[]
|
||||||
private var chosenDevice:RemoteDeviceInfo?
|
private var chosenDevice:RemoteDeviceInfo?
|
||||||
private var lastError:Error?
|
private var lastError:Error?
|
||||||
private var refreshTimer: Timer? = nil
|
|
||||||
private var isDiscovering=false
|
|
||||||
|
|
||||||
private var connectionEstablished = false
|
private var connectionEstablished = false
|
||||||
private var timeoutDispatchWorkItem: DispatchWorkItem? = nil
|
private var timeoutDispatchWorkItem: DispatchWorkItem? = nil
|
||||||
@@ -127,8 +125,6 @@ class ShareViewController: NSViewController, ShareExtensionDelegate{
|
|||||||
timeoutDispatchWorkItem?.cancel()
|
timeoutDispatchWorkItem?.cancel()
|
||||||
|
|
||||||
if chosenDevice==nil{
|
if chosenDevice==nil{
|
||||||
isDiscovering = false
|
|
||||||
refreshTimer?.invalidate()
|
|
||||||
NearbyConnectionManager.shared.stopDeviceDiscovery()
|
NearbyConnectionManager.shared.stopDeviceDiscovery()
|
||||||
}
|
}
|
||||||
NearbyConnectionManager.shared.removeShareExtensionDelegate(self)
|
NearbyConnectionManager.shared.removeShareExtensionDelegate(self)
|
||||||
@@ -163,7 +159,6 @@ class ShareViewController: NSViewController, ShareExtensionDelegate{
|
|||||||
backing: .buffered,
|
backing: .buffered,
|
||||||
defer: false)
|
defer: false)
|
||||||
|
|
||||||
panel.title = "SwiftUI Sheet"
|
|
||||||
panel.contentView = hostingView
|
panel.contentView = hostingView
|
||||||
|
|
||||||
self.qrCodeSheetView = panel
|
self.qrCodeSheetView = panel
|
||||||
@@ -332,8 +327,6 @@ class ShareViewController: NSViewController, ShareExtensionDelegate{
|
|||||||
|
|
||||||
func selectDevice(device:RemoteDeviceInfo){
|
func selectDevice(device:RemoteDeviceInfo){
|
||||||
|
|
||||||
isDiscovering = false
|
|
||||||
refreshTimer?.invalidate()
|
|
||||||
NearbyConnectionManager.shared.stopDeviceDiscovery()
|
NearbyConnectionManager.shared.stopDeviceDiscovery()
|
||||||
|
|
||||||
listViewWrapper?.animator().isHidden=true
|
listViewWrapper?.animator().isHidden=true
|
||||||
@@ -394,14 +387,12 @@ class ShareViewController: NSViewController, ShareExtensionDelegate{
|
|||||||
|
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
|
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
|
||||||
NearbyConnectionManager.shared.startDeviceDiscovery()
|
NearbyConnectionManager.shared.startDeviceDiscovery()
|
||||||
self.isDiscovering = true
|
|
||||||
self.scheduleAutomaticQrCodeView()
|
self.scheduleAutomaticQrCodeView()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
log("Main app is already running")
|
log("Main app is already running")
|
||||||
NearbyConnectionManager.shared.startDeviceDiscovery()
|
NearbyConnectionManager.shared.startDeviceDiscovery()
|
||||||
self.isDiscovering = true
|
|
||||||
self.scheduleAutomaticQrCodeView()
|
self.scheduleAutomaticQrCodeView()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user