Skip to content

Address issue with deleting the last cell model in the DataSource #49

Description

@ChrishonWyllie

Upon deleting the last cell model in a DataSourceProvider section, it will delete the array that represents the section as well.
This is normal behavior except for when it was the last section in the entire DataSourceProvider.
Doing this will return a completely empty provider, which can cause crashes when checking the numberOfItems(in section: Int) function.

Refactor the func deleteCellItems(atIndexPaths indexPaths: [IndexPath]) to avoid doing this

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workinginvalidThis doesn't seem right

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions