-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Example:
let previous: [(String, String)] = [
("41", "Alpha 1"),
("42", "Beta 1"),
("43", "Gamma 1"),
("44", "Delta 1"),
]
let new: [(String, String)] = [
("40", "Hello!"),
("41", "Alpha 2"),
("43", "Gamma 2"),
("42", "Beta 2"),
("44", "Delta 2"),
]
previous.diff(new, identifierSelector: { $0.0 })Results in this diff:
ElementDiff(deleted: [], inserted: [0], moved: [0: 1, 1: 3, 3: 4], unmoved: [2])Which causes this crash:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'attempt to perform an insert and a move to the same index path (<NSIndexPath: 0xc000000000600016> {length = 2, path = 0 - 3})'
I guess this means we can't blindly reload cells. I'll remove that feature for now.
Metadata
Metadata
Assignees
Labels
No labels