Fixes assert being hit when entering a conversation on iOS 8

This commit is contained in:
Diego Sanchez 2016-04-17 23:38:18 +01:00
parent a95e971055
commit fb98769002
1 changed files with 1 additions and 4 deletions

View File

@ -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]? {