SponsorBlock icon indicating copy to clipboard operation
SponsorBlock copied to clipboard

Refactored inspectTime into previewTime

Open Choromanski opened this issue 2 years ago • 2 comments

  • [x] I agree to license my contribution under LGPL-3.0 or my contribution is from another project with a license compatible with LGPL-3.0

To test this pull request, follow the instructions in the wiki.


Looking through the source code I noticed that these two functions are extremely similar and thought there was two options to clean it up:

  1. Merge the two functions into one [Implemented this one]
  2. Simplify the old previewTime function by removing the skipToEndTime argument and implementing functionality for it in the inspectTime function

Choromanski avatar Oct 19 '23 19:10 Choromanski

I appretiate the try but I think this makes the code less understandble

ajayyy avatar Oct 19 '23 19:10 ajayyy

Yeah it kills the readability, if you are looking for more readable code would something like this be preferred as Inspect and End buttons are functionally identical.

Choromanski avatar Oct 21 '23 21:10 Choromanski