2
2
mirror of https://github.com/mastodon/mastodon-ios synced 2025-04-11 22:58:02 +02:00

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

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)