kbeelman / TokuCinema

Monster Movie Review Website
2 stars 0 forks source link

Media page sort order #23

Closed kbeelman closed 6 years ago

kbeelman commented 6 years ago

Linking to the Media page (i.e., clicking the Media link from the Navigation) versus reloading the page results in the list of Media having a different sort order. Reloading the Media page seems to sort the Media in the order in which they are listed in Firebase.

Linking to the Media page (results in the desired sort order):

media-gallery

Linking to the Media page:

media-gallery
bayes343 commented 6 years ago

@kbeelman, I don't remember what it's supposed to sort by. Did you just want it to be by year? So like, by year within each country section?

kbeelman commented 6 years ago

It should sort by the movie's release date, which it does correctly when you click on a link to that page. When you reload the page, it sorts the media in the order they appear in Firebase (but still separated by countries).

bayes343 commented 6 years ago

Cool, it's sounds like a change detection thing. A good use case for an Angular "Pipe." Those things re-run whenever changes occur.

kbeelman commented 6 years ago

Thanks for fixing this, and thanks for thinking ahead and fixing this issue for movies as well. The movies in Firebase are basically already in the order that they show up in on the site, but it looks like this issue could have affected them as well. Good catch!