mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-11 02:51:11 +00:00
Fix: iOS share extension not detecting new devices after a while
This commit is contained in:
1 parent
734cf766d5
commit
fdc19b6f62
4 files changed
+19
-17
No files matched your search
@@ -1321,8 +1321,8 @@
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
SHARED_BUILD = 90;
|
||||
SHARED_VERSION = 2.6.1;
|
||||
SHARED_BUILD = 91;
|
||||
SHARED_VERSION = 2.7.1;
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
@@ -1384,8 +1384,8 @@
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = macosx;
|
||||
SHARED_BUILD = 90;
|
||||
SHARED_VERSION = 2.6.1;
|
||||
SHARED_BUILD = 91;
|
||||
SHARED_VERSION = 2.7.1;
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
|
||||
@@ -197,14 +197,14 @@ class ReceiveModel: ObservableObject, InboundAppDelegate {
|
||||
|
||||
#if os(iOS)
|
||||
errorVibration()
|
||||
#else
|
||||
DispatchQueue.main.async {
|
||||
self.hideQuickDropToast()
|
||||
}
|
||||
#endif
|
||||
|
||||
controlPlusScreen(false)
|
||||
ErrorAlertHandler.shared.showErrorAlert(for: device.name ?? "Android", error: error)
|
||||
|
||||
DispatchQueue.main.async {
|
||||
self.hideQuickDropToast()
|
||||
}
|
||||
} else {
|
||||
|
||||
#if os(iOS)
|
||||
@@ -288,6 +288,7 @@ class ReceiveModel: ObservableObject, InboundAppDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
#if os(macOS)
|
||||
func showReviewIfAppropriate(currentTransmissionCount: Int) {
|
||||
// If distributed directly, do not request review here as it does not work
|
||||
if pendingReview && !DistributionDetector.isDirectDistributionEnabled {
|
||||
@@ -300,6 +301,7 @@ class ReceiveModel: ObservableObject, InboundAppDelegate {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -74,13 +74,6 @@ struct DeviceListView: View {
|
||||
|
||||
HStack {
|
||||
|
||||
if let image = attachments?.previewImage {
|
||||
image
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: 10, height: 10)
|
||||
}
|
||||
|
||||
LUIText(attachments?.shortDescription ?? NearbyConnectionManager.shared.deviceInfo.name ?? "Unknown".localized(), isBold: true)
|
||||
.lineLimit(1)
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class ShareViewController: UIViewController {
|
||||
|
||||
loadAttachments(with: extensionContext, loadedItems: { [self] result in
|
||||
|
||||
log("ShareViewController: Loaded attachments: \(result)")
|
||||
log("[ShareViewController] Loaded attachments: \(result)")
|
||||
|
||||
var attachmentDetails = result
|
||||
attachmentDetails.closeView = { [weak self] in
|
||||
@@ -48,5 +48,12 @@ class ShareViewController: UIViewController {
|
||||
|
||||
hostingController.didMove(toParent: self)
|
||||
}
|
||||
|
||||
|
||||
override func viewDidDisappear(_ animated: Bool) {
|
||||
NearbyConnectionManager.shared.stopDeviceDiscovery()
|
||||
|
||||
super.viewDidDisappear(animated)
|
||||
log("[ShareViewController] Disappeared view.")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user