FIx: Cannot save images to photos if custom directory chosen

This commit is contained in:
Leon Böttger committed 2025-11-29 18:39:52 +01:00
1 parent 9e7278d327
commit 488f898d7b
3 files changed
+11 -11

No files matched your search

@@ -118,6 +118,11 @@ public class NearbyConnectionManager: NSObject, NetServiceDelegate, InboundNearb
}
deinit {
self.stopAccessingSaveDirectory()
}
public func becomeVisible() {
if startedAdvertising {
log("[NearbyConnectionManager] Already advertising, skipping")
@@ -231,11 +236,6 @@ public class NearbyConnectionManager: NSObject, NetServiceDelegate, InboundNearb
func connectionWasTerminated(connection: InboundNearbyConnection, savedFiles: [URL], error: Error?) {
incomingConnections.removeValue(forKey: connection.id)
// If there are no more incoming connections, we can stop accessing the save directory
if incomingConnections.isEmpty {
self.stopAccessingSaveDirectory()
}
if !connection.wasUserRejected {
inboundAppDelegates.forEach { delegate in
delegate.connectionWasTerminated(connectionID: connection.id, from: connection.remoteDeviceInfo ?? RemoteDeviceInfo(name: "UnknownDevice".localized(), type: .unknown), savedFiles: savedFiles, wasPlainTextTransfer: connection.isPlainTextTransfer, error: error)