The best way to solve it is write special ViewModel for CommentItem, but if so it means that every comment would store command for like and for delete. So I decided to write only a wrapper for Comment and still use this command from PhotoInsideViewModel. In this case we hold only single instance of like/delete comment commands. Also with this wrappers we calculate like/dislike amount not every time per clicking but once per showing. This should speed up the process by far
I had not simplified styles and there is still some special converters but at least one is removed.
Fixes # (issues)
93
Opens # (issues)
Type of change
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] My code builds clean without any errors or warnings
Description
The best way to solve it is write special ViewModel for CommentItem, but if so it means that every comment would store command for like and for delete. So I decided to write only a wrapper for Comment and still use this command from PhotoInsideViewModel. In this case we hold only single instance of like/delete comment commands. Also with this wrappers we calculate like/dislike amount not every time per clicking but once per showing. This should speed up the process by far
I had not simplified styles and there is still some special converters but at least one is removed.
Fixes # (issues)
93
Opens # (issues)
Type of change
Checklist:
Design
If you have change design fill in this part
A picture of design before pull request
A picture of design after pull request