mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-21 05:46:03 +00:00
Fix: iOS share extension not detecting new devices after a while #2
This commit is contained in:
1 parent
fdc19b6f62
commit
9e7278d327
2 files changed
+5
-3
No files matched your search
@@ -65,10 +65,10 @@ struct DeviceListView: View {
|
|||||||
BottomBarView(header: "QuickDrop", navigationBarLayout: isShareExtension() ? .SmallOnlyAlways : .Default, bottomViewHeight: 30) {
|
BottomBarView(header: "QuickDrop", navigationBarLayout: isShareExtension() ? .SmallOnlyAlways : .Default, bottomViewHeight: 30) {
|
||||||
VStack {
|
VStack {
|
||||||
|
|
||||||
if nearbyConnectionManager.hasLocalNetworkPermission {
|
let attachments = nearbyConnectionManager.attachments
|
||||||
VStack(alignment: .leading, spacing: 8) {
|
|
||||||
|
|
||||||
let attachments = nearbyConnectionManager.attachments
|
if nearbyConnectionManager.hasLocalNetworkPermission && attachments == nil {
|
||||||
|
VStack(alignment: .leading, spacing: 8) {
|
||||||
|
|
||||||
FormHeader(name: attachments == nil ? "YouAreVisibleAs".localized() : "YouAreSending".localized())
|
FormHeader(name: attachments == nil ? "YouAreVisibleAs".localized() : "YouAreSending".localized())
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ class ShareViewController: UIViewController {
|
|||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
|
||||||
|
NearbyConnectionManager.shared.stopDeviceDiscovery()
|
||||||
|
|
||||||
loadAttachments(with: extensionContext, loadedItems: { [self] result in
|
loadAttachments(with: extensionContext, loadedItems: { [self] result in
|
||||||
|
|
||||||
log("[ShareViewController] Loaded attachments: \(result)")
|
log("[ShareViewController] Loaded attachments: \(result)")
|
||||||
|
|||||||
Reference in new issue
Block a user