suppress share cgm transmitter address with loop

if 'Suppress Loop Share' is enabled.

This is fix is only required if there's multiple instances of xDrip4iOS running on one device and if Loop is used
This commit is contained in:
Johan Degraeve 2022-07-25 23:28:48 +02:00
parent f50dbdbe28
commit 36c2756ca7
1 changed files with 7 additions and 1 deletions

View File

@ -49,8 +49,14 @@ class BluetoothPeripheralManager: NSObject {
if newValue != currentCgmTransmitterAddress {
cgmTransmitterInfoChanged()
// share new address with loop, but not if suppressLoopShare is on
if !UserDefaults.standard.suppressLoopShare {
setCGMTransmitterInSharedUserDefaults()
}
setCGMTransmitterInSharedUserDefaults()
}