Просмотр исходного кода

set default state and image for simulatorPump

kskandis 1 год назад
Родитель
Сommit
ae7c7414a6
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      FreeAPS/Sources/APS/DeviceDataManager.swift

+ 3 - 0
FreeAPS/Sources/APS/DeviceDataManager.swift

@@ -94,6 +94,9 @@ final class BaseDeviceDataManager: DeviceDataManager, Injectable {
                     }
                     pumpExpiresAtDate.send(endTime)
                 }
+                if let simulatorPump = pumpManager as? MockPumpManager {
+                    pumpDisplayState.value = PumpDisplayState(name: simulatorPump.localizedTitle, image: simulatorPump.smallImage)
+                }
             } else {
                 pumpDisplayState.value = nil
                 pumpExpiresAtDate.send(nil)