Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
Fix infinite reload
Browse files Browse the repository at this point in the history
  • Loading branch information
jzzocc committed Nov 8, 2022
1 parent 86b6fff commit 7900413
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Views/UIKit/Content Views/AnnouncementView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
}
}
}

0 comments on commit 7900413

Please sign in to comment.