From 7fb8fcaca11c6b438fa4206ed2bca5c0f1e0955d Mon Sep 17 00:00:00 2001 From: Marcus Kida Date: Tue, 12 Dec 2023 08:56:28 +0100 Subject: [PATCH] Fix issue caused by duplicate IDs after reloadingtimeline --- .../Scene/HomeTimeline/HomeTimelineViewModel+Diffable.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mastodon/Scene/HomeTimeline/HomeTimelineViewModel+Diffable.swift b/Mastodon/Scene/HomeTimeline/HomeTimelineViewModel+Diffable.swift index e022f92e4..e15d5c4a1 100644 --- a/Mastodon/Scene/HomeTimeline/HomeTimelineViewModel+Diffable.swift +++ b/Mastodon/Scene/HomeTimeline/HomeTimelineViewModel+Diffable.swift @@ -45,7 +45,7 @@ extension HomeTimelineViewModel { var newSnapshot: NSDiffableDataSourceSnapshot = { let newItems = records.map { record in StatusItem.feed(record: record) - } + }.removingDuplicates() var snapshot = NSDiffableDataSourceSnapshot() snapshot.appendSections([.main]) snapshot.appendItems(newItems, toSection: .main)