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.