If you check the usages of animateView you will see that the typical range will be 0 all the way to 500, with most in the 100-250 range.
It should've been done with a default value in the first place. It is pretty much arbitrary right now, it was whatever the person felt like at the time of writing.
I'll leave this task to another PR, which the goal will be to standardize the used duration of animations.
_Originally posted by @mauriciocolli in https://github.com/TeamNewPipe/NewPipe/pull/2309#discussion_r371625549
Hi @Stypox ,
I check the source code and see that most values are from 0-500 as you mentioned above.
Before fixing this, I want to make sure that is it OK if I change all the values from 0-500 to 250 (average)?
In the case of value bigger than 500 ( f.e 800), should I just leave it there?
I vote for 420 ms :rofl:
If you want to find _all_ magic numbers in our code that aren't a constant, you could uncomment https://github.com/TeamNewPipe/NewPipe/blob/dev/checkstyle.xml#L148, see https://checkstyle.org/config_coding.html#MagicNumber. We should reduce the amount of magic numbers in general.
Hi @Stypox ,
I check the source code and see that most values are from 0-500 as you mentioned above.
Before fixing this, I want to make sure that is it OK if I change all the values from 0-500 to 250 (average)?
In the case of value bigger than 500 ( f.e 800), should I just leave it there?
250 seems good to me :-D
Anyway, if that value doesn't turn out to be good it will be changeable with only one edit, since it would be a constant. So go for 250ms ;-)
I also vote for 250ms :D, probably have the issue fixed this weekend.