Streamability icon indicating copy to clipboard operation
Streamability copied to clipboard

✏️ Refactor ShowDetailsScreen handler() function

Open maxh1231 opened this issue 10 months ago • 0 comments

Is your feature request related to a problem or need? Please describe.

Due to this function condtionally calling multiple requests, it is not prepared to accept a state from the router. To prevent unnecessary requests, refactor this function to elegantly handle cases where show details is passed through the router, while still making requests necessary for rendering the entire screen.

Describe alternatives you've considered

  • Nested conditional, bleh
  • in-file util function to detect router states and assert which requests still need to be made
  • WIP

Additional context

With the newly created SeasonsScreen, this screen accepts the details state through the router, and passes the state back to ShowDetailsScreen via a provided 'back' button. However, ShowDetailsScreen does not detect that and prevent a unnecessary getTvDetails request.

maxh1231 avatar Feb 18 '25 02:02 maxh1231