From 7dcc9065e6bd452e6cc29468527d84e1a80fba9a Mon Sep 17 00:00:00 2001 From: covidsafe-support <64945427+covidsafe-support@users.noreply.github.com> Date: Wed, 23 Dec 2020 16:13:14 +1100 Subject: [PATCH] 20201223-release --- CovidSafe/Herald/Sensor/BLE/BLEDatabase.swift | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CovidSafe/Herald/Sensor/BLE/BLEDatabase.swift b/CovidSafe/Herald/Sensor/BLE/BLEDatabase.swift index 63ebc11..fb65b4f 100644 --- a/CovidSafe/Herald/Sensor/BLE/BLEDatabase.swift +++ b/CovidSafe/Herald/Sensor/BLE/BLEDatabase.swift @@ -164,18 +164,24 @@ public class BLEDevice : NSObject { /// Service characteristic for signalling between BLE devices, e.g. to keep awake var signalCharacteristic: CBCharacteristic? { didSet { - lastUpdatedAt = Date() + if signalCharacteristic != nil { + lastUpdatedAt = Date() + } delegate.device(self, didUpdate: .signalCharacteristic) }} /// Service characteristic for reading payload data var payloadCharacteristic: CBCharacteristic? { didSet { - lastUpdatedAt = Date() + if payloadCharacteristic != nil { + lastUpdatedAt = Date() + } delegate.device(self, didUpdate: .payloadCharacteristic) }} var legacyPayloadCharacteristic: CBCharacteristic? { didSet { - lastUpdatedAt = Date() + if legacyPayloadCharacteristic != nil { + lastUpdatedAt = Date() + } delegate.device(self, didUpdate: .payloadCharacteristic) }} /// Device operating system, this is necessary for selecting different interaction procedures for each platform.