@@ -36,7 +36,7 @@ struct PostDimensions: Hashable, Equatable {
3636 var size : CGSize {
3737
3838 let compactVSpacing = self . spacingHeight / 2
39- let tagHeight = urlTagHeight. isNil ? 0 : ( compactVSpacing / 2 ) + ( self . urlTagHeight ?? 0 )
39+ let tagHeight = urlTagHeight == nil ? 0 : ( compactVSpacing / 2 ) + ( self . urlTagHeight ?? 0 )
4040 let compactHeight = max ( self . titleSize. height + compactVSpacing + self . badgeSize. height + tagHeight, ( mediaSize? . height ?? 0 ) ) + dividerSize. height + compactVSpacing
4141 let normalHeight = self . titleSize. height + ( self . bodySize? . height ?? 0 ) + ( self . mediaSize? . height ?? 0 ) + self . dividerSize. height + self . badgeSize. height + self . spacingHeight
4242 return CGSize (
@@ -137,7 +137,7 @@ func getPostDimensions(post: Post, columnWidth: Double = UIScreen.screenWidth, s
137137 }
138138
139139
140- let compactTitleWidth = postGeneralSpacing + VotesCluster. verticalWidth + ( extractedMedia. isNil ? 0 : postGeneralSpacing + compactMediaSize. width)
140+ let compactTitleWidth = postGeneralSpacing + VotesCluster. verticalWidth + ( extractedMedia == nil ? 0 : postGeneralSpacing + compactMediaSize. width)
141141 let titleContentWidth = contentWidth - ( compact ? compactTitleWidth : 0 )
142142
143143 ACC_titleHeight = round ( NSString ( string: title) . boundingRect ( with: CGSize ( width: titleContentWidth, height: . infinity) , options: [ . usesLineFragmentOrigin] , attributes: [ . font: UIFont . systemFont ( ofSize: theme. titleText. size, weight: theme. titleText. weight. ut) ] , context: nil ) . height)
@@ -164,7 +164,7 @@ func getPostDimensions(post: Post, columnWidth: Double = UIScreen.screenWidth, s
164164
165165 let theresTitle = true
166166 let theresSelftext = !compact && !data. selftext. isEmpty
167- let theresMedia = ! extractedMedia. isNil
167+ let theresMedia = extractedMedia != nil
168168 let theresSubDivider = true
169169 let theresBadge = true
170170 let elements = [ theresTitle, theresSelftext, !compact && theresMedia, theresSubDivider, theresBadge]
0 commit comments