From 236a22553d5cb9e07b3115c03864c882e0c41b77 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Fri, 3 Apr 2026 15:47:34 -0500 Subject: chore: add explanatory comments to all intentional empty closures --- Hutch/Views/Repositories/FileTreeView.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Hutch/Views/Repositories/FileTreeView.swift') diff --git a/Hutch/Views/Repositories/FileTreeView.swift b/Hutch/Views/Repositories/FileTreeView.swift index 462a25e..ec33822 100644 --- a/Hutch/Views/Repositories/FileTreeView.swift +++ b/Hutch/Views/Repositories/FileTreeView.swift @@ -260,7 +260,9 @@ private struct FileTreeContentView: View { FileContentShareSheet(activityItems: [text]) } .alert("Share Unavailable", isPresented: $showShareUnavailableAlert) { - Button("OK", role: .cancel) {} + Button("OK", role: .cancel) { + // no-op: .cancel role handles alert dismissal + } } message: { Text(SRHTShareTarget.file.fallbackMessage) } @@ -403,7 +405,9 @@ struct FileContentShareSheet: UIViewControllerRepresentable { UIActivityViewController(activityItems: activityItems, applicationActivities: nil) } - func updateUIViewController(_ : UIActivityViewController, context _: Context) {} + func updateUIViewController(_ : UIActivityViewController, context _: Context) { + // no-op: UIActivityViewController manages its own state after presentation + } } final class CodeFileUIView: UIView { -- cgit v1.2.3