修复清空按钮在暗夜模式下显示为灰色

This commit is contained in:
2026-07-15 22:26:20 +08:00
parent 000a56295f
commit 6c62d4bce4
+7 -1
View File
@@ -96,10 +96,16 @@ class ClipInboxViewController: UIViewController {
let isEmpty = clips.isEmpty let isEmpty = clips.isEmpty
emptyLabel.isHidden = !isEmpty emptyLabel.isHidden = !isEmpty
tableView.isHidden = isEmpty tableView.isHidden = isEmpty
navigationItem.rightBarButtonItem?.isEnabled = !isEmpty
} }
@objc private func didTapClearButton() { @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( let alert = UIAlertController(
title: "清空收集箱", title: "清空收集箱",
message: "确定要删除所有保存的文案吗?此操作不可撤销。", message: "确定要删除所有保存的文案吗?此操作不可撤销。",