IGListKit icon indicating copy to clipboard operation
IGListKit copied to clipboard

Pull to refresh

Open adelbios opened this issue 5 years ago • 9 comments

hi, I trying to implement pull to refresh , but i got this error Duplicate identifier 3 for object LegacyProject.ExplorationModel with object LegacyProject.ExplorationModel' How i can fix that

adelbios avatar Jul 19 '19 19:07 adelbios

ListDiffable->diffIdentifier(),your implementation of this method may be wrong.

Bruce-pac avatar Jul 23 '19 04:07 Bruce-pac

@Bruce-pac can . you provide demo example ?!

adelbios avatar Jul 23 '19 07:07 adelbios

Any help ?!

adelbios avatar Jul 24 '19 10:07 adelbios

What is your implementation of this method?

Bruce-pac avatar Jul 25 '19 08:07 Bruce-pac

Just i call api agin , and append data Ex: fetchRepoAPI()

adelbios avatar Jul 25 '19 09:07 adelbios

you can see my demo OC or Swift

Bruce-pac avatar Jul 25 '19 14:07 Bruce-pac

I am grateful to you

adelbios avatar Jul 25 '19 15:07 adelbios

@Bruce-pac nice demo but pull to refresh isn’t work do you have an example to help me ?!

adelbios avatar Aug 23 '19 17:08 adelbios

You should probably replace the data in your datasource instead of appending it, because if it's a refresh, it's probably expected to get the same ids, and then depending on the implementation of the diffIdentifier, you would also get the same identifiers, causing the "duplicate identifier" assertion.

koenpunt avatar Nov 20 '19 21:11 koenpunt