diff options
| author | Christian Cleberg <[email protected]> | 2026-03-24 16:39:15 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-03-24 16:39:15 -0500 |
| commit | 8da2f907d690a59124d9008c0d8e1e792133702b (patch) | |
| tree | 79fcc86662155709fe2beb7b6559270254b96c01 /Hutch/Views/Repositories | |
| parent | 1f8a13e069ef5ebb7092803870d7152958ceb84e (diff) | |
| download | hutch-8da2f907d690a59124d9008c0d8e1e792133702b.tar.gz hutch-8da2f907d690a59124d9008c0d8e1e792133702b.tar.bz2 hutch-8da2f907d690a59124d9008c0d8e1e792133702b.zip | |
fix: add nested comments to satisfy sonar rule swift:S1186
Diffstat (limited to 'Hutch/Views/Repositories')
| -rw-r--r-- | Hutch/Views/Repositories/HgRepositorySettingsView.swift | 13 | ||||
| -rw-r--r-- | Hutch/Views/Repositories/RepositorySettingsView.swift | 8 |
2 files changed, 16 insertions, 5 deletions
diff --git a/Hutch/Views/Repositories/HgRepositorySettingsView.swift b/Hutch/Views/Repositories/HgRepositorySettingsView.swift index 5f45da8..6a27465 100644 --- a/Hutch/Views/Repositories/HgRepositorySettingsView.swift +++ b/Hutch/Views/Repositories/HgRepositorySettingsView.swift @@ -55,7 +55,9 @@ struct HgRepositorySettingsView: View { "Permanently delete \(repository.owner.canonicalName)/\(repository.name)?", isPresented: $showDeleteConfirmation ) { - Button("Cancel", role: .cancel) {} + Button("Cancel", role: .cancel) { + // Alert dismissal is implicit; no additional action required. + } Button("Delete", role: .destructive) { Task { await viewModel.deleteRepository() @@ -76,7 +78,9 @@ struct HgRepositorySettingsView: View { } } )) { - Button("Cancel", role: .cancel) {} + Button("Cancel", role: .cancel) { + // Alert dismissal is implicit; no additional action required. + } Button("Remove Access", role: .destructive) { guard let entry = pendingACLDeletion else { return } Task { @@ -234,7 +238,10 @@ struct HgRepositorySettingsView: View { .font(.caption) .foregroundStyle(.secondary) - Button("Remove Revision", role: .destructive) {} + Button("Remove Revision", role: .destructive) { + // Not implemented: the hg.sr.ht API does not expose a histedit endpoint. + // This button is disabled until the API supports revision removal. + } .disabled(true) } } diff --git a/Hutch/Views/Repositories/RepositorySettingsView.swift b/Hutch/Views/Repositories/RepositorySettingsView.swift index 5606ec6..ff72335 100644 --- a/Hutch/Views/Repositories/RepositorySettingsView.swift +++ b/Hutch/Views/Repositories/RepositorySettingsView.swift @@ -58,7 +58,9 @@ struct RepositorySettingsView: View { "Permanently delete \(repository.owner.canonicalName)/\(repository.name)?", isPresented: $showDeleteConfirmation ) { - Button("Cancel", role: .cancel) {} + Button("Cancel", role: .cancel) { + // Alert dismissal is implicit; no additional action required. + } Button("Delete", role: .destructive) { Task { await viewModel.deleteRepository() @@ -79,7 +81,9 @@ struct RepositorySettingsView: View { } } )) { - Button("Cancel", role: .cancel) {} + Button("Cancel", role: .cancel) { + // Alert dismissal is implicit; no additional action required. + } Button("Remove Access", role: .destructive) { guard let entry = pendingACLDeletion else { return } Task { |
