mirror of
https://github.com/mastodon/mastodon-ios
synced 2025-04-11 22:58:02 +02:00
Avoid crash due to duplicate ids in search results
Fixes #1416 Mastodon iOS application sometimes quit when performing a search and scrolling down the results
This commit is contained in:
parent
f294dbe091
commit
828e3c516e
@ -66,7 +66,7 @@ extension SearchResultViewModel {
|
||||
|
||||
var snapshot = NSDiffableDataSourceSnapshot<SearchResultSection, SearchResultItem>()
|
||||
snapshot.appendSections([.main])
|
||||
snapshot.appendItems(items, toSection: .main)
|
||||
snapshot.appendItems(items.removingDuplicates(), toSection: .main)
|
||||
|
||||
if let currentState = self.stateMachine.currentState {
|
||||
switch currentState {
|
||||
|
Loading…
x
Reference in New Issue
Block a user