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 { |
| 260 | 260 | FileContentShareSheet(activityItems: [text]) |
| 261 | 261 | } |
| 262 | 262 | .alert("Share Unavailable", isPresented: $showShareUnavailableAlert) { |
| 263 | | Button("OK", role: .cancel) {} |
| 263 | Button("OK", role: .cancel) { |
| 264 | // no-op: .cancel role handles alert dismissal |
| 265 | } |
| 264 | 266 | } message: { |
| 265 | 267 | Text(SRHTShareTarget.file.fallbackMessage) |
| 266 | 268 | } |
| @@ -403,7 +405,9 @@ struct FileContentShareSheet: UIViewControllerRepresentable { |
| 403 | 405 | UIActivityViewController(activityItems: activityItems, applicationActivities: nil) |
| 404 | 406 | } |
| 405 | 407 | |
| 406 | | func updateUIViewController(_ : UIActivityViewController, context _: Context) {} |
| 408 | func updateUIViewController(_ : UIActivityViewController, context _: Context) { |
| 409 | // no-op: UIActivityViewController manages its own state after presentation |
| 410 | } |
| 407 | 411 | } |
| 408 | 412 | |
| 409 | 413 | final class CodeFileUIView: UIView { |
Hutch/Views/Repositories/HgRepositoryDetailView.swift
+3 −1
| @@ -289,7 +289,9 @@ struct HgRepositoryDetailView: View { |
| 289 | 289 | FileContentShareSheet(activityItems: [shareURL ?? fileContent]) |
| 290 | 290 | } |
| 291 | 291 | .alert("Share Unavailable", isPresented: $showShareUnavailableAlert) { |
| 292 | | Button("OK", role: .cancel) {} |
| 292 | Button("OK", role: .cancel) { |
| 293 | // no-op: .cancel role handles alert dismissal |
| 294 | } |
| 293 | 295 | } message: { |
| 294 | 296 | Text(SRHTShareTarget.file.fallbackMessage) |
| 295 | 297 | } |
Hutch/Views/Tickets/TicketListView.swift
+5 −3
| @@ -25,8 +25,8 @@ struct TicketListView: View { |
| 25 | 25 | |
| 26 | 26 | init( |
| 27 | 27 | 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 */ } |
| 30 | 30 | ) { |
| 31 | 31 | self._tracker = State(initialValue: tracker) |
| 32 | 32 | self.onTrackerUpdated = onTrackerUpdated |
| @@ -123,7 +123,9 @@ struct TicketListView: View { |
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | .alert("Delete Tracker?", isPresented: $showDeleteTrackerConfirmation) { |
| 126 | | Button("Cancel", role: .cancel) {} |
| 126 | Button("Cancel", role: .cancel) { |
| 127 | // no-op: .cancel role handles alert dismissal |
| 128 | } |
| 127 | 129 | Button("Delete", role: .destructive) { |
| 128 | 130 | guard let trackerManagementViewModel else { return } |
| 129 | 131 | Task { |
Hutch/Views/Tickets/TrackerListView.swift
+3 −1
| @@ -106,7 +106,9 @@ struct TrackerListView: View { |
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | 108 | )) { |
| 109 | | Button("Cancel", role: .cancel) {} |
| 109 | Button("Cancel", role: .cancel) { |
| 110 | // no-op: .cancel role handles alert dismissal |
| 111 | } |
| 110 | 112 | Button("Delete", role: .destructive) { |
| 111 | 113 | guard let pendingDeletion, let viewModel else { return } |
| 112 | 114 | Task { |
Hutch/Views/Tickets/TrackerManagementView.swift
+6 −2
| @@ -820,7 +820,9 @@ struct TrackerACLManagementSheet: View { |
| 820 | 820 | } |
| 821 | 821 | } |
| 822 | 822 | )) { |
| 823 | | Button("Cancel", role: .cancel) {} |
| 823 | Button("Cancel", role: .cancel) { |
| 824 | // no-op: .cancel role handles alert dismissal |
| 825 | } |
| 824 | 826 | Button("Delete", role: .destructive) { |
| 825 | 827 | guard let pendingDeletion else { return } |
| 826 | 828 | Task { |
| @@ -1157,7 +1159,9 @@ struct TrackerLabelManagementSheet: View { |
| 1157 | 1159 | } |
| 1158 | 1160 | } |
| 1159 | 1161 | )) { |
| 1160 | | Button("Cancel", role: .cancel) {} |
| 1162 | Button("Cancel", role: .cancel) { |
| 1163 | // no-op: .cancel role handles alert dismissal |
| 1164 | } |
| 1161 | 1165 | Button("Delete", role: .destructive) { |
| 1162 | 1166 | guard let pendingDeletion else { return } |
| 1163 | 1167 | Task { |