macOS: rename UpdateState.isIdle to isHidden (#13613)

This commit is contained in:
Mitchell Hashimoto
2026-08-04 19:28:05 -07:00
committed by GitHub
3 changed files with 5 additions and 5 deletions

View File

@@ -15,7 +15,7 @@ struct UpdatePill: View {
private let textFont = NSFont.systemFont(ofSize: 11, weight: .medium)
var body: some View {
if !model.state.isIdle {
if !model.state.isHidden {
pillButton
.popover(isPresented: $showPopover, arrowEdge: .bottom) {
UpdatePopoverView(model: model)

View File

@@ -185,7 +185,7 @@ enum UpdateState: Equatable {
case extracting(Extracting)
case installing(Installing)
var isIdle: Bool {
var isHidden: Bool {
if case .idle = self { return true }
return false
}

View File

@@ -98,15 +98,15 @@ struct UpdateStateTests {
#expect(state1 != state2)
}
// MARK: - isIdle Tests
// MARK: - isHidden Tests
@Test func testIsIdleTrue() {
let state: UpdateState = .idle
#expect(state.isIdle == true)
#expect(state.isHidden == true)
}
@Test func testIsIdleFalse() {
let state: UpdateState = .checking(.init(cancel: {}))
#expect(state.isIdle == false)
#expect(state.isHidden == false)
}
}