Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed inappropriate TableView reload and added correct events in CollectionDirector #50

Closed
wants to merge 7 commits into from

Conversation

balavor
Copy link

@balavor balavor commented Aug 17, 2020

Description

TableDirector reloads the entire table when it's not necessary.

How to reproduce

  1. Set a section with some elements.
  2. Create a new TableSection with the same id as previous and with the same rows.
  3. Add some additional new rows to that section.
  4. Set that section in reload method:
    director.reload(afterUpdate: { director -> UITableView.RowAnimation in
      director.set(sections: [section])
      return .automatic
    })

EXR: New elements appear on the bottom with animation
ACR: The entire section is reloaded with an animation.

Fix

A fix for that is to use the same logic to compare sections content as in the CollectionDirector.

Related Issues

#45

Also

Additionally, PR includes event fixes in CollectionDirector delegate methods.

@balavor balavor force-pushed the master branch 2 times, most recently from e50d0fe to c14e066 Compare October 8, 2020 14:38
@balavor balavor closed this Oct 15, 2020
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.

1 participant