Fix issue caused by duplicate IDs after reloadingtimeline

This commit is contained in:
Marcus Kida 2023-12-12 08:56:28 +01:00
parent ab689d3c02
commit 7fb8fcaca1
No known key found for this signature in database
GPG Key ID: 19FF64E08013CA40
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ extension HomeTimelineViewModel {
var newSnapshot: NSDiffableDataSourceSnapshot<StatusSection, StatusItem> = {
let newItems = records.map { record in
StatusItem.feed(record: record)
}
}.removingDuplicates()
var snapshot = NSDiffableDataSourceSnapshot<StatusSection, StatusItem>()
snapshot.appendSections([.main])
snapshot.appendItems(newItems, toSection: .main)