From fb98769002c7e61cdfd1f3197e6b83129faeda3c Mon Sep 17 00:00:00 2001 From: Diego Sanchez Date: Sun, 17 Apr 2016 23:38:18 +0100 Subject: [PATCH] Fixes assert being hit when entering a conversation on iOS 8 --- .../Collaborators/ChatCollectionViewLayout.swift | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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]? {