Commit 9025627391

90256273913c400c5603be82427e9321416ec8d8

parent: 101f0ed799

Unsigned

cmc <hello@cleberg.net> · 2026-04-03 20:47 UTC

chore: add explanatory comments to all intentional empty closures

Layout: unified · split

Hutch/Views/Repositories/FileTreeView.swift +6 −2
@@ -260,7 +260,9 @@ private struct FileTreeContentView: View {
260260 FileContentShareSheet(activityItems: [text])
261261 }
262262 .alert("Share Unavailable", isPresented: $showShareUnavailableAlert) {
263 Button("OK", role: .cancel) {}
263 Button("OK", role: .cancel) {
264 // no-op: .cancel role handles alert dismissal
265 }
264266 } message: {
265267 Text(SRHTShareTarget.file.fallbackMessage)
266268 }
@@ -403,7 +405,9 @@ struct FileContentShareSheet: UIViewControllerRepresentable {
403405 UIActivityViewController(activityItems: activityItems, applicationActivities: nil)
404406 }
405407
406 func updateUIViewController(_ : UIActivityViewController, context _: Context) {}
408 func updateUIViewController(_ : UIActivityViewController, context _: Context) {
409 // no-op: UIActivityViewController manages its own state after presentation
410 }
407411}
408412
409413final class CodeFileUIView: UIView {
Hutch/Views/Repositories/HgRepositoryDetailView.swift +3 −1
@@ -289,7 +289,9 @@ struct HgRepositoryDetailView: View {
289289 FileContentShareSheet(activityItems: [shareURL ?? fileContent])
290290 }
291291 .alert("Share Unavailable", isPresented: $showShareUnavailableAlert) {
292 Button("OK", role: .cancel) {}
292 Button("OK", role: .cancel) {
293 // no-op: .cancel role handles alert dismissal
294 }
293295 } message: {
294296 Text(SRHTShareTarget.file.fallbackMessage)
295297 }
Hutch/Views/Tickets/TicketListView.swift +5 −3
@@ -25,8 +25,8 @@ struct TicketListView: View {
2525
2626 init(
2727 tracker: TrackerSummary,
28 onTrackerUpdated: @escaping (TrackerSummary) -> Void = { _ in },
29 onTrackerDeleted: @escaping (TrackerSummary) -> Void = { _ in }
28 onTrackerUpdated: @escaping (TrackerSummary) -> Void = { _ in /* no-op: default for callers that don't handle this event */ },
29 onTrackerDeleted: @escaping (TrackerSummary) -> Void = { _ in /* no-op: default for callers that don't handle this event */ }
3030 ) {
3131 self._tracker = State(initialValue: tracker)
3232 self.onTrackerUpdated = onTrackerUpdated
@@ -123,7 +123,9 @@ struct TicketListView: View {
123123 }
124124 }
125125 .alert("Delete Tracker?", isPresented: $showDeleteTrackerConfirmation) {
126 Button("Cancel", role: .cancel) {}
126 Button("Cancel", role: .cancel) {
127 // no-op: .cancel role handles alert dismissal
128 }
127129 Button("Delete", role: .destructive) {
128130 guard let trackerManagementViewModel else { return }
129131 Task {
Hutch/Views/Tickets/TrackerListView.swift +3 −1
@@ -106,7 +106,9 @@ struct TrackerListView: View {
106106 }
107107 }
108108 )) {
109 Button("Cancel", role: .cancel) {}
109 Button("Cancel", role: .cancel) {
110 // no-op: .cancel role handles alert dismissal
111 }
110112 Button("Delete", role: .destructive) {
111113 guard let pendingDeletion, let viewModel else { return }
112114 Task {
Hutch/Views/Tickets/TrackerManagementView.swift +6 −2
@@ -820,7 +820,9 @@ struct TrackerACLManagementSheet: View {
820820 }
821821 }
822822 )) {
823 Button("Cancel", role: .cancel) {}
823 Button("Cancel", role: .cancel) {
824 // no-op: .cancel role handles alert dismissal
825 }
824826 Button("Delete", role: .destructive) {
825827 guard let pendingDeletion else { return }
826828 Task {
@@ -1157,7 +1159,9 @@ struct TrackerLabelManagementSheet: View {
11571159 }
11581160 }
11591161 )) {
1160 Button("Cancel", role: .cancel) {}
1162 Button("Cancel", role: .cancel) {
1163 // no-op: .cancel role handles alert dismissal
1164 }
11611165 Button("Delete", role: .destructive) {
11621166 guard let pendingDeletion else { return }
11631167 Task {