Skip to content

SingleSection Calculators don't support changing view after init #72

Description

@danj-stripe

I'm upgrading Dwifft to 0.6.3, and had a breakage I didn't expect from the release notes. Our code creates the SingleSectionTableViewDiffCalculator with a dummy UITableView, and then during viewDidLoad it swaps in the "real" table view.

I'm changing our code to eliminate the dummy view, but I think it'd be a good idea to change the public API of the calculators to disallow changing the view, because I've also run into bugs where changing the tableView doesn't invalidate the calculator's state and it subsequently triggers a crash from UIKit (ex: asking the new tableView to delete a row that it's not actually displaying, but the previous tableView was).

It looks like SingleSectionCollectionViewDiffCalculator has the same potential bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions