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

This commit is contained in:
Arturs Krumins authored and GitHub committed 2024-08-21 17:04:12 +01:00
1 parent 5cb8badb22
commit fd9c080103
1 file changed
+7
@@ -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
}
}