lbry-android icon indicating copy to clipboard operation
lbry-android copied to clipboard

FileViewFragment and ChannelCommentsFragment have redundant functions

Open clay53 opened this issue 3 years ago • 1 comments

The Issue

FileViewFragment and ChannelCommentsFragment have redundant functions relating to commenting. The functions initCommentForm, clearReplyToComment, postComment, validateAndCheckPostComments, and more are almost all the same or differ only slightly. These functions should be moved to one spot to significantly improve code quality and make the app easier to develop.

Acceptance Criteria

  1. Redundant functions are made not redundant anymore

Definition of Done

  • [ ] Tested against acceptance criteria
  • [ ] Tested against the assumptions of the user story
  • [ ] The project builds without errors
  • [ ] Unit tests are written and passing
  • [ ] Tests on devices/browsers listed in the issue have passed
  • [ ] QA performed & issues resolved
  • [ ] Refactoring completed
  • [ ] Any configuration or build changes documented
  • [ ] Documentation updated
  • [ ] Peer Code Review performed

clay53 avatar Dec 13 '20 01:12 clay53

I am going to code a custom compound view for the "new comment form" layout which will move all those methods into a unique class which then it could be inserted into the layouts.

kekkyojin avatar Jan 04 '21 10:01 kekkyojin