Join GitHub today
Fix crash moving rows & sections #14
I noticed that sometimes UITableView asserts failure when applying diff with moveRows & moveSections.
So far separating moves into deletions & insertions can resolve this issue, though I have not inspected the diff logic.
Hi @banjun ! I was surprised to see your PR. You are everywhere. 🤩
I was wondering if you are convinced that the actual steps in the patch correct? Or is the patch wrong and it is crashing the animation.
There appear to be some cases where the wrong patch is being generated. See #32 I still need to read the paper to figure out how the algorithm actually works. It would be cool if we could make a UT that repo'ed the problem.
[PS: Coming to Tokyo next week for iOSDC. Maybe we can get together and hack out a good solution sometime then.
@rayfix you, too.
In my case I think the patch is logically correct, but some patch that have moving rows can cause crash in UITableView. (By the way, checking #32, wrong patches may be generated in some case...?
The fact that a logically correct patch can cause crash is noted on other differential change libs, such as RxDataSources & DifferenceKit. They use multi-stage datasource commit to avoid problematic patches.