diff --git a/Chatto/Source/ChatController/Collaborators/ChatCollectionViewLayout.swift b/Chatto/Source/ChatController/Collaborators/ChatCollectionViewLayout.swift index 2504950..1c52b67 100644 --- a/Chatto/Source/ChatController/Collaborators/ChatCollectionViewLayout.swift +++ b/Chatto/Source/ChatController/Collaborators/ChatCollectionViewLayout.swift @@ -93,10 +93,7 @@ public class ChatCollectionViewLayout: UICollectionViewLayout { } public override func collectionViewContentSize() -> CGSize { - if self.layoutNeedsUpdate { - self.prepareLayout() - } - return self.layoutModel.contentSize + return self.layoutModel?.contentSize ?? .zero } override public func layoutAttributesForElementsInRect(rect: CGRect) -> [UICollectionViewLayoutAttributes]? {