diff --git a/QuickDropiOS/View/ContentView.swift b/QuickDropiOS/View/ContentView.swift index b719b63..daa58a7 100644 --- a/QuickDropiOS/View/ContentView.swift +++ b/QuickDropiOS/View/ContentView.swift @@ -65,11 +65,11 @@ struct DeviceListView: View { BottomBarView(header: "QuickDrop", navigationBarLayout: isShareExtension() ? .SmallOnlyAlways : .Default, bottomViewHeight: 30) { VStack { - if nearbyConnectionManager.hasLocalNetworkPermission { + let attachments = nearbyConnectionManager.attachments + + if nearbyConnectionManager.hasLocalNetworkPermission && attachments == nil { VStack(alignment: .leading, spacing: 8) { - let attachments = nearbyConnectionManager.attachments - FormHeader(name: attachments == nil ? "YouAreVisibleAs".localized() : "YouAreSending".localized()) HStack { diff --git a/iOSShareExtension/ShareViewController.swift b/iOSShareExtension/ShareViewController.swift index 3181c5a..c13e8ef 100644 --- a/iOSShareExtension/ShareViewController.swift +++ b/iOSShareExtension/ShareViewController.swift @@ -13,6 +13,8 @@ class ShareViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() + NearbyConnectionManager.shared.stopDeviceDiscovery() + loadAttachments(with: extensionContext, loadedItems: { [self] result in log("[ShareViewController] Loaded attachments: \(result)")