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:
parent
ab689d3c02
commit
7fb8fcaca1
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user