Skip to content

Commit 9ccb7dd

Browse files
authored
[PAL-172] only display pump manager provided HUD view when there is no status highlight (#607)
1 parent e2e9ba1 commit 9ccb7dd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

LoopUI/Views/PumpStatusHUDView.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public final class PumpStatusHUDView: DeviceStatusHUDView, NibLoadable {
4343
}
4444

4545
override public func presentStatusHighlight() {
46-
guard !statusStackView.arrangedSubviews.contains(statusHighlightView) else {
46+
guard !isStatusHighlightDisplayed else {
4747
return
4848
}
4949

@@ -86,7 +86,14 @@ public final class PumpStatusHUDView: DeviceStatusHUDView, NibLoadable {
8686

8787
public func addPumpManagerProvidedHUDView(_ pumpManagerProvidedHUD: BaseHUDView) {
8888
self.pumpManagerProvidedHUD = pumpManagerProvidedHUD
89+
guard !isStatusHighlightDisplayed else {
90+
self.pumpManagerProvidedHUD.isHidden = true
91+
return
92+
}
8993
statusStackView.addArrangedSubview(self.pumpManagerProvidedHUD)
9094
}
9195

96+
private var isStatusHighlightDisplayed: Bool {
97+
statusStackView.arrangedSubviews.contains(statusHighlightView)
98+
}
9299
}

0 commit comments

Comments
 (0)