From 06a7b5f5dff8bed66cc4fc793a60b47f098f5e71 Mon Sep 17 00:00:00 2001 From: Mika Westphal Date: Mon, 16 Oct 2023 15:44:40 +0200 Subject: [PATCH] fixup! fixup! fixup! Added sleep prevention during file transfer --- NearbyShare/NearbyConnectionManager.swift | 2 +- NearbyShare/SleepManager.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NearbyShare/NearbyConnectionManager.swift b/NearbyShare/NearbyConnectionManager.swift index 932cf84..1e1ef8d 100644 --- a/NearbyShare/NearbyConnectionManager.swift +++ b/NearbyShare/NearbyConnectionManager.swift @@ -387,7 +387,7 @@ public class NearbyConnectionManager : NSObject, NetServiceDelegate, InboundNear outgoingTransfers.removeValue(forKey: connection.id) } - public func getActiveConnections() -> Int { + public func getActiveConnectionsCount() -> Int { return activeConnections.count } } diff --git a/NearbyShare/SleepManager.swift b/NearbyShare/SleepManager.swift index b0bff95..47bf689 100644 --- a/NearbyShare/SleepManager.swift +++ b/NearbyShare/SleepManager.swift @@ -27,7 +27,7 @@ class SleepManager{ } public func enableSleep(){ - if(assertionID == 0 || NearbyConnectionManager.shared.getActiveConnections() != 0){ + if(assertionID == 0 || NearbyConnectionManager.shared.getActiveConnectionsCount() != 0){ return }