diff --git a/iOS/MainTimeline/Modern Cells/MainTimelineFeedCell.swift b/iOS/MainTimeline/Modern Cells/MainTimelineFeedCell.swift index e3d9afd7b..64f4c61dd 100644 --- a/iOS/MainTimeline/Modern Cells/MainTimelineFeedCell.swift +++ b/iOS/MainTimeline/Modern Cells/MainTimelineFeedCell.swift @@ -92,12 +92,13 @@ class MainTimelineFeedCell: UITableViewCell { let paragraphStyle = NSMutableParagraphStyle() paragraphStyle.minimumLineHeight = UIFont.preferredFont(forTextStyle: .headline).pointSize paragraphStyle.maximumLineHeight = UIFont.preferredFont(forTextStyle: .headline).pointSize + paragraphStyle.lineBreakMode = .byTruncatingTail let titleAttributes: [NSAttributedString.Key: Any] = [ .font: UIFont.preferredFont(forTextStyle: .headline), .paragraphStyle: paragraphStyle, .foregroundColor: isSelected ? UIColor.white : UIColor.label ] - let titleWithNewline = cellData.title + "\n" + let titleWithNewline = cellData.title + (cellData.summary != "" ? "\n" : "" ) let titleAttributed = NSAttributedString(string: titleWithNewline, attributes: titleAttributes) attributedCellText.append(titleAttributed) } @@ -105,6 +106,7 @@ class MainTimelineFeedCell: UITableViewCell { let paragraphStyle = NSMutableParagraphStyle() paragraphStyle.minimumLineHeight = UIFont.preferredFont(forTextStyle: .body).pointSize paragraphStyle.maximumLineHeight = UIFont.preferredFont(forTextStyle: .body).pointSize + paragraphStyle.lineBreakMode = .byTruncatingTail let summaryAttributes: [NSAttributedString.Key: Any] = [ .font: UIFont.preferredFont(forTextStyle: .body), .paragraphStyle: paragraphStyle, diff --git a/iOS/MainTimeline/Modern Cells/MainTimelineIconFeedCell.swift b/iOS/MainTimeline/Modern Cells/MainTimelineIconFeedCell.swift index adb960c77..9bf804f01 100644 --- a/iOS/MainTimeline/Modern Cells/MainTimelineIconFeedCell.swift +++ b/iOS/MainTimeline/Modern Cells/MainTimelineIconFeedCell.swift @@ -121,12 +121,13 @@ class MainTimelineIconFeedCell: UITableViewCell { let paragraphStyle = NSMutableParagraphStyle() paragraphStyle.minimumLineHeight = UIFont.preferredFont(forTextStyle: .headline).pointSize paragraphStyle.maximumLineHeight = UIFont.preferredFont(forTextStyle: .headline).pointSize + paragraphStyle.lineBreakMode = .byTruncatingTail let titleAttributes: [NSAttributedString.Key: Any] = [ .font: UIFont.preferredFont(forTextStyle: .headline), .paragraphStyle: paragraphStyle, .foregroundColor: isSelected ? UIColor.white : UIColor.label ] - let titleWithNewline = cellData.title + "\n" + let titleWithNewline = cellData.title + (cellData.summary != "" ? "\n" : "" ) let titleAttributed = NSAttributedString(string: titleWithNewline, attributes: titleAttributes) attributedCellText.append(titleAttributed) } @@ -134,6 +135,7 @@ class MainTimelineIconFeedCell: UITableViewCell { let paragraphStyle = NSMutableParagraphStyle() paragraphStyle.minimumLineHeight = UIFont.preferredFont(forTextStyle: .body).pointSize paragraphStyle.maximumLineHeight = UIFont.preferredFont(forTextStyle: .body).pointSize + paragraphStyle.lineBreakMode = .byTruncatingTail let summaryAttributes: [NSAttributedString.Key: Any] = [ .font: UIFont.preferredFont(forTextStyle: .body), .paragraphStyle: paragraphStyle,