From d6968ea122d910b432bd539cf2fa3d1cee962fdb Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Mon, 13 Apr 2026 20:32:40 -0500 Subject: fix: more sonarqube quality fixes --- Hutch/Views/Pastes/PasteListView.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Hutch/Views/Pastes') diff --git a/Hutch/Views/Pastes/PasteListView.swift b/Hutch/Views/Pastes/PasteListView.swift index 17bb8ac..b325153 100644 --- a/Hutch/Views/Pastes/PasteListView.swift +++ b/Hutch/Views/Pastes/PasteListView.swift @@ -276,14 +276,14 @@ private struct CreatePasteSheet: View { NavigationStack { Form { Section("Files") { - ForEach($files) { $file in + ForEach($files) { fileBinding in VStack(alignment: .leading, spacing: 8) { - TextField("Filename (optional)", text: $file.filename) + TextField("Filename (optional)", text: fileBinding.filename) .autocorrectionDisabled() .textInputAutocapitalization(.never) ZStack(alignment: .topLeading) { - if file.contents.isEmpty { + if fileBinding.wrappedValue.contents.isEmpty { Text("Paste contents") .foregroundStyle(.tertiary) .padding(.top, 8) @@ -291,7 +291,7 @@ private struct CreatePasteSheet: View { .allowsHitTesting(false) } - TextEditor(text: $file.contents) + TextEditor(text: fileBinding.contents) .font(.system(.body, design: .monospaced)) .frame(minHeight: 180) } -- cgit v1.2.3