I suggest moving such operations to PlaylistViewModel
and do all operations from there. It also simplifies implementation of later improvements like showing activity indicator if needed or reloading certain cells or views from there.
I think that SongCellViewModel
should have a actionBlock
which will take enum
with associated values - for example .select(song)
.delete(song)
- and this way you can easily communicate between PlaylistViewModel
and SongCellViewModel
.
One more suggestion is to use Dependency Injections instead of using shared
for all type of services.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…