From d5ef1d53e5f77d19dba8b8059c80b538a3e14f2a Mon Sep 17 00:00:00 2001 From: dr3amer <91037083+dr3am37@users.noreply.github.com> Date: Fri, 27 May 2022 02:17:57 -0700 Subject: [PATCH] fix(discover): Carousel touch not working when scrolling page and recommendations and similar movie navigation (#4633) * fixed touch not working on carousels * fixed touch not working * Movie details component fixes Fixed recommendations and similar not changing the data on the component by calling the init function again on param change Moved the ngif results > 0 to the mat-expansion panel to avoid rendering the entire element if it doesn't have any results instead of having an empty panel. * removed unused line, added scroll to top on init * updated recommendation refresh implementation Changed the implementation to use the router instead in order to reload the component instead of just reloading the data. This implementation makes sure the component gets destroyed on navigation eliminating any memory leaks, reloading CSS in case of having animations on page load and generally a continuation of the experience you get when you browse into a movie from the discover page. --- .../carousel-list/carousel-list.component.ts | 1 + .../movie/movie-details.component.html | 8 ++-- .../movie/movie-details.component.ts | 40 +++++++++++++------ 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/src/Ombi/ClientApp/src/app/discover/components/carousel-list/carousel-list.component.ts b/src/Ombi/ClientApp/src/app/discover/components/carousel-list/carousel-list.component.ts index 9617c993e..43cde5036 100644 --- a/src/Ombi/ClientApp/src/app/discover/components/carousel-list/carousel-list.component.ts +++ b/src/Ombi/ClientApp/src/app/discover/components/carousel-list/carousel-list.component.ts @@ -48,6 +48,7 @@ export class CarouselListComponent implements OnInit { constructor(private searchService: SearchV2Service, private storageService: StorageService, private featureFacade: FeaturesFacade) { + Carousel.prototype.onTouchMove = () => { }, this.responsiveOptions = [ { breakpoint: '4000px', diff --git a/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html b/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html index 282683fed..90cf455f0 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html +++ b/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html @@ -239,14 +239,14 @@ - + {{'MediaDetails.RecommendationsTitle' | translate}} -
+
- + {{'MediaDetails.SimilarTitle' | translate}} -
+