mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-05 07:08:39 +00:00
macOS: rename UpdateState.isIdle to isHidden (#13613)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user