mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2025-02-02 18:36:44 +01:00
fix: duplicate auto complete items may crash the app issue
This commit is contained in:
parent
975f8205d2
commit
2784fb8771
@ -46,7 +46,7 @@ final class AutoCompleteViewModel {
|
|||||||
|
|
||||||
var snapshot = NSDiffableDataSourceSnapshot<AutoCompleteSection, AutoCompleteItem>()
|
var snapshot = NSDiffableDataSourceSnapshot<AutoCompleteSection, AutoCompleteItem>()
|
||||||
snapshot.appendSections([.main])
|
snapshot.appendSections([.main])
|
||||||
snapshot.appendItems(items, toSection: .main)
|
snapshot.appendItems(items.removingDuplicates(), toSection: .main)
|
||||||
if let currentState = self.stateMachine.currentState {
|
if let currentState = self.stateMachine.currentState {
|
||||||
switch currentState {
|
switch currentState {
|
||||||
case is State.Loading, is State.Fail:
|
case is State.Loading, is State.Fail:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user