Commit 56043c8483
Unsigned
Layout: unified · split
gitbay/MRs/MRFilter.swift +4 −1
| @@ -10,8 +10,11 @@ nonisolated struct MRFilter: Equatable, Sendable { | ||
| 10 | 10 | case all |
| 11 | 11 | |
| 12 | 12 | var id: String { rawValue } |
| 13 | /// Segment text. Five segments share a phone's width, so the | |
| 14 | /// source-gone state is one word; the rows and chips still say | |
| 15 | /// "source gone" in full. | |
| 13 | 16 | var label: String { |
| 14 | self == .sourceGone ? "Source gone" : rawValue.capitalized | |
| 17 | self == .sourceGone ? "Gone" : rawValue.capitalized | |
| 15 | 18 | } |
| 16 | 19 | } |
| 17 | 20 | |
gitbayTests/ListFilterTests.swift +1 −1
| @@ -107,7 +107,7 @@ struct MRFilterTests { | ||
| 107 | 107 | var f = MRFilter() |
| 108 | 108 | f.state = .sourceGone |
| 109 | 109 | #expect(f.flags() == ["--state", "source_gone"]) |
| 110 | #expect(MRFilter.State.sourceGone.label == "Source gone") | |
| 110 | #expect(MRFilter.State.sourceGone.label == "Gone") | |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | @Test func everyStateTheCommandAcceptsIsOffered() { |