ios: fix last message being hidden on load (#4733)

This commit is contained in:
Arturs Krumins
2024-08-21 17:04:12 +01:00
committed by GitHub
parent 5cb8badb22
commit fd9c080103
@@ -180,6 +180,13 @@ struct ReverseList<Item: Identifiable & Hashable & Sendable, Content: View>: UIV
snapshot,
animatingDifferences: itemCount != 0 && abs(items.count - itemCount) == 1
)
// Sets content offset on initial load
if itemCount == 0 {
tableView.setContentOffset(
CGPoint(x: 0, y: -InvertedTableView.inset),
animated: false
)
}
itemCount = items.count
}
}