Fix height calculation in CallFlowLayout

Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
This commit is contained in:
Marcel Müller 2023-01-12 16:26:23 +01:00
Родитель 71da2e20a6
Коммит f997753ecd
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -91,7 +91,7 @@ class CallFlowLayout: UICollectionViewFlowLayout {
// Calculate cell height
let sectionInsetHeight = sectionInset.top + sectionInset.bottom
let safeAreaInsetHeight = collectionView.safeAreaInsets.top + collectionView.safeAreaInsets.bottom
let marginsAndInsetsHeight = sectionInsetHeight + safeAreaInsetHeight + minimumLineSpacing * CGFloat(numberOfRows + 1)
let marginsAndInsetsHeight = sectionInsetHeight + safeAreaInsetHeight + minimumLineSpacing * CGFloat(numberOfRows - 1)
var itemHeight = ((contentSize.height - marginsAndInsetsHeight) / CGFloat(numberOfRows)).rounded(.down)
// Enfore minimum cell height