Compare commits

..

3 Commits

Author SHA1 Message Date
fish 1a525c763e 归档笔记保留 Note 格式化操作
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-17 22:33:41 +08:00
fish a0dffdc715 增大收集箱列表文案与时间间距 2026-07-16 21:46:43 +08:00
fish 4765d48021 收集箱列表展示完整文案 2026-07-16 21:44:51 +08:00
2 changed files with 3 additions and 7 deletions
+3 -3
View File
@@ -246,8 +246,10 @@ extension ClipInboxViewController: UITableViewDataSource {
var config = cell.defaultContentConfiguration() var config = cell.defaultContentConfiguration()
config.text = previewText(for: clip.text) config.text = previewText(for: clip.text)
config.textProperties.numberOfLines = 0
config.secondaryText = formattedDate(clip.createdAt) config.secondaryText = formattedDate(clip.createdAt)
config.secondaryTextProperties.color = .secondaryLabel config.secondaryTextProperties.color = .secondaryLabel
config.textToSecondaryTextVerticalPadding = 12
cell.contentConfiguration = config cell.contentConfiguration = config
cell.accessoryType = .disclosureIndicator cell.accessoryType = .disclosureIndicator
@@ -255,9 +257,7 @@ extension ClipInboxViewController: UITableViewDataSource {
} }
private func previewText(for text: String) -> String { private func previewText(for text: String) -> String {
let lines = text.components(separatedBy: .newlines) let preview = text.trimmingCharacters(in: .whitespacesAndNewlines)
let firstTwoLines = Array(lines.prefix(2))
let preview = firstTwoLines.joined(separator: " ").trimmingCharacters(in: .whitespaces)
if preview.isEmpty { if preview.isEmpty {
return "(无内容)" return "(无内容)"
} }
-4
View File
@@ -35,10 +35,6 @@ class FormatNoteViewController: UIViewController {
setupUI() setupUI()
if let initialText = initialText { if let initialText = initialText {
textView.text = initialText textView.text = initialText
isNoteFormatted = true
noteButton.setTitle("复制并打开备忘录", for: .normal)
rightBarButtonMode = .reset
updateRightBarButtonItem()
} }
setupKeyboardObservers() setupKeyboardObservers()
} }