From 4340fd3635634af45488faa1a1d2558e440a6958 Mon Sep 17 00:00:00 2001 From: fish Date: Wed, 15 Jul 2026 23:33:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91=E8=AD=A6?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Note/ClipEditViewController.swift | 5 +++-- Note/TextFormatter.swift | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Note/ClipEditViewController.swift b/Note/ClipEditViewController.swift index 4b74086..c07547f 100644 --- a/Note/ClipEditViewController.swift +++ b/Note/ClipEditViewController.swift @@ -39,7 +39,7 @@ class ClipEditViewController: UIViewController { private func setupNavigationBar() { let saveButton = UIBarButtonItem( title: "保存", - style: .done, + style: .prominent, target: self, action: #selector(didTapSaveButton) ) @@ -85,8 +85,9 @@ class ClipEditViewController: UIViewController { Task { do { try await ClipStore.shared.update(updatedClip) - await MainActor.run { + _ = await MainActor.run { self.navigationController?.popViewController(animated: true) + return () } } catch { await MainActor.run { diff --git a/Note/TextFormatter.swift b/Note/TextFormatter.swift index 5d4f9b4..f65561e 100644 --- a/Note/TextFormatter.swift +++ b/Note/TextFormatter.swift @@ -38,7 +38,7 @@ enum TextFormatter { return content } - static func formatForShortcut(_ text: String) -> String { + static nonisolated func formatForShortcut(_ text: String) -> String { var content = text content = content.replacingOccurrences(of: " ", with: "") content = content.replacingOccurrences(of: " ", with: "")