]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+search/search.component.ts
Non latin keyboard layout support player shortcut (#5684)
[github/Chocobozzz/PeerTube.git] / client / src / app / +search / search.component.ts
index 62b1c4446b0abb9f3deb8d72244a427d689159ac..31394a1d14cb366dcd88b86cfe292e7be35cdff6 100644 (file)
@@ -1,4 +1,4 @@
-import { forkJoin, Subscription } from 'rxjs'
+import { forkJoin, Subject, Subscription } from 'rxjs'
 import { LinkType } from 'src/types/link.type'
 import { Component, OnDestroy, OnInit } from '@angular/core'
 import { ActivatedRoute, Router } from '@angular/router'
@@ -44,6 +44,8 @@ export class SearchComponent implements OnInit, OnDestroy {
 
   userMiniature: User
 
+  onSearchDataSubject = new Subject<any>()
+
   private subActivatedRoute: Subscription
   private isInitialLoad = false // set to false to show the search filters on first arrival
 
@@ -98,7 +100,7 @@ export class SearchComponent implements OnInit, OnDestroy {
           this.search()
         },
 
-        error: err => this.notifier.error(err.text)
+        error: err => this.notifier.error(err.message)
       })
 
     this.userService.getAnonymousOrLoggedUser()
@@ -147,6 +149,8 @@ export class SearchComponent implements OnInit, OnDestroy {
         this.lastSearchTarget = this.advancedSearch.searchTarget
 
         this.hasMoreResults = this.results.length < this.pagination.totalItems
+
+        this.onSearchDataSubject.next(results)
       },
 
       error: err => {