Skip to content

Conversation

@florina-muntenescu
Copy link
Collaborator

No description provided.

@florina-muntenescu florina-muntenescu changed the title Step 4 - Add separators every 10k stars Step 3 - Add separators every 10k stars Mar 13, 2020
override fun areItemsTheSame(oldItem: Repo, newItem: Repo): Boolean {
return if (oldItem is Repo && newItem is Repo) {
oldItem == newItem
private val UIMODEL_COMPARATOR = object : DiffUtil.ItemCallback<UiModel>() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code as written will cause all separators to shimmer, it should be checking for separators too

Should be fine to say all separators are the same, since DiffUtil will be doing greedy matching

I don't think any of this matters in behavior here, since without swipe to refresh, you're not actually going to see any diffing 🤷‍♂️ but still good to recommend correct code in case they do

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added separator as well

@florina-muntenescu florina-muntenescu deleted the step3_separators branch May 5, 2020 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants