onmyway133/DeepDiff

Base class implementation

tobyworks opened this issue · 0 comments

Hi,

Is it possible to have diffId be a function that returns an Int instead of it being a var. I'm running into the issue of the following: I have a BaseWrapper class, that holds an item and a cell basically for collecitonview rendering.

This Basewrapper is being extended by different types. Bassically each cell has a wrapper that corresponds to it.

When I call commitUpdate on my collectionview it will diff the oldwrappers from the newwrappers.

However there is no way for me to se the diffId unique for each wrapper implementation because diffId is there before self is.

Can i make the implementation of BaseWrapper responsible for supplying diffId? but still be able to call diff(old: [BaseWrapper], new: [BaseWrapper])