mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-22 06:15:59 +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;
|
MTL_FAST_MATH = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
SHARED_BUILD = 90;
|
SHARED_BUILD = 91;
|
||||||
SHARED_VERSION = 2.6.1;
|
SHARED_VERSION = 2.7.1;
|
||||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
@@ -1384,8 +1384,8 @@
|
|||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
SHARED_BUILD = 90;
|
SHARED_BUILD = 91;
|
||||||
SHARED_VERSION = 2.6.1;
|
SHARED_VERSION = 2.7.1;
|
||||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||||
SWIFT_COMPILATION_MODE = wholemodule;
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
|
|||||||
@@ -197,14 +197,14 @@ class ReceiveModel: ObservableObject, InboundAppDelegate {
|
|||||||
|
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
errorVibration()
|
errorVibration()
|
||||||
|
#else
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
self.hideQuickDropToast()
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
controlPlusScreen(false)
|
controlPlusScreen(false)
|
||||||
ErrorAlertHandler.shared.showErrorAlert(for: device.name ?? "Android", error: error)
|
ErrorAlertHandler.shared.showErrorAlert(for: device.name ?? "Android", error: error)
|
||||||
|
|
||||||
DispatchQueue.main.async {
|
|
||||||
self.hideQuickDropToast()
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
@@ -288,6 +288,7 @@ class ReceiveModel: ObservableObject, InboundAppDelegate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if os(macOS)
|
||||||
func showReviewIfAppropriate(currentTransmissionCount: Int) {
|
func showReviewIfAppropriate(currentTransmissionCount: Int) {
|
||||||
// If distributed directly, do not request review here as it does not work
|
// If distributed directly, do not request review here as it does not work
|
||||||
if pendingReview && !DistributionDetector.isDirectDistributionEnabled {
|
if pendingReview && !DistributionDetector.isDirectDistributionEnabled {
|
||||||
@@ -300,6 +301,7 @@ class ReceiveModel: ObservableObject, InboundAppDelegate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -74,13 +74,6 @@ struct DeviceListView: View {
|
|||||||
|
|
||||||
HStack {
|
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)
|
LUIText(attachments?.shortDescription ?? NearbyConnectionManager.shared.deviceInfo.name ?? "Unknown".localized(), isBold: true)
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class ShareViewController: UIViewController {
|
|||||||
|
|
||||||
loadAttachments(with: extensionContext, loadedItems: { [self] result in
|
loadAttachments(with: extensionContext, loadedItems: { [self] result in
|
||||||
|
|
||||||
log("ShareViewController: Loaded attachments: \(result)")
|
log("[ShareViewController] Loaded attachments: \(result)")
|
||||||
|
|
||||||
var attachmentDetails = result
|
var attachmentDetails = result
|
||||||
attachmentDetails.closeView = { [weak self] in
|
attachmentDetails.closeView = { [weak self] in
|
||||||
@@ -48,5 +48,12 @@ class ShareViewController: UIViewController {
|
|||||||
|
|
||||||
hostingController.didMove(toParent: self)
|
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