aimed / foxxy

🦊 Foxxy - a really foxy random movie picker!
https://foxxy.surge.sh
1 stars 0 forks source link

A reroll does not always happen after filters are applied #6

Closed aimed closed 6 years ago

aimed commented 6 years ago

There are some edge cases, where a reroll will not happen after filter are applied. These include changing the genre when using the watchlist and maybe? others.

aimed commented 6 years ago

Problem for both cases is here:

https://github.com/aimed/foxxy/blob/1708ab33465795cb60eaadd89d265f0200ae27cf/src/Random/RandomPage/RandomPage.tsx#L76-L80

  1. Changing the genre when using the watchlist won't cause the list of movies to change and thus no reroll will be triggered.
  2. When receiving a new list of movies, we use the reroll method, but reroll only uses the current props and not the set of next props.