ios: chat rows measured at the chat width when they first appear (#7931)

* ios: chat rows measured at the chat width when they first appear

* ios, ci: chat view references with rows at their measured height
This commit is contained in:
Evgeny @ SimpleX Chat authored and GitHub committed 2026-10-29 09:43:24 +00:00
1 parent 563fe17f93
commit 501eec671d
3 files changed
+2 -2

No files matched your search

@@ -55,7 +55,7 @@ struct ScrollRepresentable<Content: View, ScrollItem>: UIViewControllerRepresent
}
cell.isHidden = false
cell.backgroundColor = .clear
let size = cell.systemLayoutSizeFitting(CGSizeMake(scrollView.bounds.width, CGFloat.greatestFiniteMagnitude))
let size = cell.systemLayoutSizeFitting(CGSizeMake(scrollView.bounds.width, CGFloat.greatestFiniteMagnitude), withHorizontalFittingPriority: .required, verticalFittingPriority: .fittingSizeLevel)
cell.frame.size.width = scrollView.bounds.width
cell.frame.size.height = size.height
return cell
@@ -74,7 +74,7 @@ struct ScrollRepresentable<Content: View, ScrollItem>: UIViewControllerRepresent
fatalError("Unexpected Cell Type for: \(item)")
}
}
let size = cell.systemLayoutSizeFitting(CGSizeMake(scrollView.bounds.width, CGFloat.greatestFiniteMagnitude))
let size = cell.systemLayoutSizeFitting(CGSizeMake(scrollView.bounds.width, CGFloat.greatestFiniteMagnitude), withHorizontalFittingPriority: .required, verticalFittingPriority: .fittingSizeLevel)
cell.frame.size.width = scrollView.bounds.width
cell.frame.size.height = size.height
cell.setNeedsLayout()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 KiB

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 KiB

After

Width:  |  Height:  |  Size: 255 KiB