From b819b0e007e578bf3d8425f19591f87029c64d06 Mon Sep 17 00:00:00 2001 From: Victor Usoltsev Date: Thu, 28 Oct 2021 10:30:14 +1300 Subject: [PATCH] fix: :bug: Hides no results message during search. (#4375) --- .../search-results/search-results.component.html | 5 ++--- .../components/search-results/search-results.component.ts | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Ombi/ClientApp/src/app/discover/components/search-results/search-results.component.html b/src/Ombi/ClientApp/src/app/discover/components/search-results/search-results.component.html index 2bd13441d..4ef9255fb 100644 --- a/src/Ombi/ClientApp/src/app/discover/components/search-results/search-results.component.html +++ b/src/Ombi/ClientApp/src/app/discover/components/search-results/search-results.component.html @@ -1,14 +1,13 @@
-
-
+
-
+

{{'Discovery.NoSearch' | translate}}

diff --git a/src/Ombi/ClientApp/src/app/discover/components/search-results/search-results.component.ts b/src/Ombi/ClientApp/src/app/discover/components/search-results/search-results.component.ts index bef8bae03..f0258b97d 100644 --- a/src/Ombi/ClientApp/src/app/discover/components/search-results/search-results.component.ts +++ b/src/Ombi/ClientApp/src/app/discover/components/search-results/search-results.component.ts @@ -50,7 +50,6 @@ export class DiscoverSearchResultsComponent implements OnInit { this.clear(); this.loadAdvancedData(); }); - } public async ngOnInit() { @@ -79,8 +78,7 @@ export class DiscoverSearchResultsComponent implements OnInit { await this.search(); } - public createInitalModel() { - this.finishLoading(); + private createInitialModel() { this.results.forEach(m => { let mediaType = RequestType.movie; @@ -119,6 +117,7 @@ export class DiscoverSearchResultsComponent implements OnInit { tvMovieDb: mediaType === RequestType.tvShow ? true : false }); }); + this.finishLoading(); } private loading() { @@ -180,6 +179,6 @@ export class DiscoverSearchResultsComponent implements OnInit { this.clear(); this.results = await this.searchService .multiSearch(this.searchTerm, this.filter).toPromise(); - this.createInitalModel(); + this.createInitialModel(); } }