]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/search/search.service.ts
Server: Add NSFW in user profile
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / search / search.service.ts
index 787c02d2b677e5368b34e64b72ddc2a3bae7213f..717a7fa500e044fecc9bdce2d0aa0440196220eb 100644 (file)
@@ -1,15 +1,18 @@
 import { Injectable } from '@angular/core';
 import { Subject } from 'rxjs/Subject';
+import { ReplaySubject } from 'rxjs/ReplaySubject';
 
 import { Search } from './search.model';
 
-// This class is needed to communicate between videos/list and search component
+// This class is needed to communicate between videos/ and search component
 // Remove it when we'll be able to subscribe to router changes
 @Injectable()
 export class SearchService {
-  searchChanged: Subject<Search>;
+  searchUpdated: Subject<Search>;
+  updateSearch: Subject<Search>;
 
   constructor() {
-    this.searchChanged = new Subject<Search>();
+    this.updateSearch = new Subject<Search>();
+    this.searchUpdated = new ReplaySubject<Search>(1);
   }
 }