Skip to content

Commit

Permalink
[PAL-172] only display pump manager provided HUD view when there is n…
Browse files Browse the repository at this point in the history
…o status highlight (#607)
  • Loading branch information
nhamming authored Dec 1, 2023
1 parent e2e9ba1 commit 9ccb7dd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion LoopUI/Views/PumpStatusHUDView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public final class PumpStatusHUDView: DeviceStatusHUDView, NibLoadable {
}

override public func presentStatusHighlight() {
guard !statusStackView.arrangedSubviews.contains(statusHighlightView) else {
guard !isStatusHighlightDisplayed else {
return
}

Expand Down Expand Up @@ -86,7 +86,14 @@ public final class PumpStatusHUDView: DeviceStatusHUDView, NibLoadable {

public func addPumpManagerProvidedHUDView(_ pumpManagerProvidedHUD: BaseHUDView) {
self.pumpManagerProvidedHUD = pumpManagerProvidedHUD
guard !isStatusHighlightDisplayed else {
self.pumpManagerProvidedHUD.isHidden = true
return
}
statusStackView.addArrangedSubview(self.pumpManagerProvidedHUD)
}

private var isStatusHighlightDisplayed: Bool {
statusStackView.arrangedSubviews.contains(statusHighlightView)
}
}

0 comments on commit 9ccb7dd

Please sign in to comment.