fix: label layout and hashtag search result title not display issue

This commit is contained in:
CMK 2021-07-26 15:50:35 +08:00
parent e77c5c4e78
commit 1d3150c620
2 changed files with 6 additions and 3 deletions

View File

@ -26,7 +26,8 @@ extension MetaLabel {
layer.masksToBounds = true layer.masksToBounds = true
textContainer.lineBreakMode = .byTruncatingTail textContainer.lineBreakMode = .byTruncatingTail
textContainer.lineFragmentPadding = 0
let font: UIFont let font: UIFont
let textColor: UIColor let textColor: UIColor

View File

@ -180,7 +180,8 @@ extension SearchResultTableViewCell {
configure(with: AvatarConfigurableViewConfiguration(avatarImageURL: nil)) configure(with: AvatarConfigurableViewConfiguration(avatarImageURL: nil))
let image = UIImage(systemName: "number.circle.fill", withConfiguration: UIImage.SymbolConfiguration(pointSize: 34, weight: .regular))!.withRenderingMode(.alwaysTemplate) let image = UIImage(systemName: "number.circle.fill", withConfiguration: UIImage.SymbolConfiguration(pointSize: 34, weight: .regular))!.withRenderingMode(.alwaysTemplate)
_imageView.image = image _imageView.image = image
_titleLabel.text = "#" + tag.name let metaContent = PlaintextMetaContent(string: "#" + tag.name)
_titleLabel.configure(content: metaContent)
guard let histories = tag.history else { guard let histories = tag.history else {
_subTitleLabel.text = "" _subTitleLabel.text = ""
return return
@ -195,7 +196,8 @@ extension SearchResultTableViewCell {
configure(with: AvatarConfigurableViewConfiguration(avatarImageURL: nil)) configure(with: AvatarConfigurableViewConfiguration(avatarImageURL: nil))
let image = UIImage(systemName: "number.circle.fill", withConfiguration: UIImage.SymbolConfiguration(pointSize: 34, weight: .regular))!.withRenderingMode(.alwaysTemplate) let image = UIImage(systemName: "number.circle.fill", withConfiguration: UIImage.SymbolConfiguration(pointSize: 34, weight: .regular))!.withRenderingMode(.alwaysTemplate)
_imageView.image = image _imageView.image = image
_titleLabel.text = "# " + tag.name let metaContent = PlaintextMetaContent(string: "#" + tag.name)
_titleLabel.configure(content: metaContent)
guard let histories = tag.histories?.sorted(by: { guard let histories = tag.histories?.sorted(by: {
$0.createAt.compare($1.createAt) == .orderedAscending $0.createAt.compare($1.createAt) == .orderedAscending
}) else { }) else {