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

There are conflicts over tableView's reload in FolderViewController #13

Open
guangmingzizai opened this issue Jan 5, 2019 · 0 comments

Comments

@guangmingzizai
Copy link

tableView.reloadData in folder.didSet conflicts with tableView.deleteRows or tableView.insertRows, so the app will crash on creating or deleting folders.

Two solutions:

  • Only one update strategy. Delete tableView.deleteRows and tableView.insertRows, or call tableView.reloadData() imperatively instead of auto call in folder.didSet.
  • Add a condition to tableView.reloadData() in folder.didSet. For example, add a updatingInteractive instance variable, set to true on start of deleteItem(item:) and insert(item:) methods, set to false on end.

Project: Recordings-controller-owned-networking*

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

No branches or pull requests

1 participant