From 6c62d4bce402157cff6e455171c90a843f9e612a Mon Sep 17 00:00:00 2001 From: fish Date: Wed, 15 Jul 2026 22:26:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B8=85=E7=A9=BA=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=9C=A8=E6=9A=97=E5=A4=9C=E6=A8=A1=E5=BC=8F=E4=B8=8B?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=BA=E7=81=B0=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Note/ClipInboxViewController.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Note/ClipInboxViewController.swift b/Note/ClipInboxViewController.swift index f437421..b55a0d4 100644 --- a/Note/ClipInboxViewController.swift +++ b/Note/ClipInboxViewController.swift @@ -96,10 +96,16 @@ class ClipInboxViewController: UIViewController { let isEmpty = clips.isEmpty emptyLabel.isHidden = !isEmpty tableView.isHidden = isEmpty - navigationItem.rightBarButtonItem?.isEnabled = !isEmpty } @objc private func didTapClearButton() { + guard !clips.isEmpty else { + let alert = UIAlertController(title: "提示", message: "收集箱为空,没有可清空的内容。", preferredStyle: .alert) + alert.addAction(UIAlertAction(title: "确定", style: .default)) + present(alert, animated: true) + return + } + let alert = UIAlertController( title: "清空收集箱", message: "确定要删除所有保存的文案吗?此操作不可撤销。",