Fix infinite reload

This commit is contained in:
Justin Mazzocchi 2022-11-07 22:15:05 -08:00
parent 86b6fffc7c
commit 79004130de
1 changed files with 6 additions and 1 deletions

View File

@ -169,7 +169,12 @@ private extension AnnouncementView {
snapshot.appendItems(viewModel.announcement.reactions, toSection: 0)
if snapshot.itemIdentifiers != dataSource.snapshot().itemIdentifiers {
dataSource.apply(snapshot, animatingDifferences: false) { viewModel.reload() }
dataSource.apply(snapshot, animatingDifferences: false) {
if self.contentTextView.frame.size == .zero
|| self.contentTextView.contentSize.height < self.contentTextView.frame.height {
viewModel.reload()
}
}
}
}
}