Compare commits

...

2 Commits

Author SHA1 Message Date
fish a0dffdc715 增大收集箱列表文案与时间间距 2026-07-16 21:46:43 +08:00
fish 4765d48021 收集箱列表展示完整文案 2026-07-16 21:44:51 +08:00
+3 -3
View File
@@ -246,8 +246,10 @@ extension ClipInboxViewController: UITableViewDataSource {
var config = cell.defaultContentConfiguration()
config.text = previewText(for: clip.text)
config.textProperties.numberOfLines = 0
config.secondaryText = formattedDate(clip.createdAt)
config.secondaryTextProperties.color = .secondaryLabel
config.textToSecondaryTextVerticalPadding = 12
cell.contentConfiguration = config
cell.accessoryType = .disclosureIndicator
@@ -255,9 +257,7 @@ extension ClipInboxViewController: UITableViewDataSource {
}
private func previewText(for text: String) -> String {
let lines = text.components(separatedBy: .newlines)
let firstTwoLines = Array(lines.prefix(2))
let preview = firstTwoLines.joined(separator: " ").trimmingCharacters(in: .whitespaces)
let preview = text.trimmingCharacters(in: .whitespacesAndNewlines)
if preview.isEmpty {
return "(无内容)"
}