Fix cell layout when thread root is a poll

This commit is contained in:
ismailgulek
2022-01-18 23:41:36 +03:00
parent 31821e205f
commit 11cfae66c7
10 changed files with 135 additions and 34 deletions
@@ -27,7 +27,6 @@ protocol ThreadSummaryViewDelegate: AnyObject {
class ThreadSummaryView: UIView {
private enum Constants {
static let viewHeight: CGFloat = 40
static let viewDefaultWidth: CGFloat = 320
static let cornerRadius: CGFloat = 8
static let lastMessageFont: UIFont = .systemFont(ofSize: 13)
@@ -53,14 +52,14 @@ class ThreadSummaryView: UIView {
self.thread = thread
super.init(frame: CGRect(origin: .zero,
size: CGSize(width: Constants.viewDefaultWidth,
height: Constants.viewHeight)))
height: RoomBubbleCellLayout.threadSummaryViewHeight)))
loadNibContent()
update(theme: ThemeService.shared().theme)
configure()
}
static func contentViewHeight(forThread thread: MXThread, fitting maxWidth: CGFloat) -> CGFloat {
return Constants.viewHeight
return RoomBubbleCellLayout.threadSummaryViewHeight
}
required init?(coder: NSCoder) {