diff options
author | Chocobozzz <me@florianbigard.com> | 2018-05-15 11:55:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-16 09:42:54 +0200 |
commit | db400f447a9f7aae1c56fa25396e93069744483f (patch) | |
tree | f45af832a5d3f4eebafd2f885b7413d9f84fa374 /client/src/app/shared/forms | |
parent | 54c3a22faa04bf13eea37f39be9149fc5eb95737 (diff) | |
download | PeerTube-db400f447a9f7aae1c56fa25396e93069744483f.tar.gz PeerTube-db400f447a9f7aae1c56fa25396e93069744483f.tar.zst PeerTube-db400f447a9f7aae1c56fa25396e93069744483f.zip |
Upgrade to rxjs 6
Diffstat (limited to 'client/src/app/shared/forms')
-rw-r--r-- | client/src/app/shared/forms/markdown-textarea.component.ts | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/client/src/app/shared/forms/markdown-textarea.component.ts b/client/src/app/shared/forms/markdown-textarea.component.ts index 928a63b28..dcc85f3cd 100644 --- a/client/src/app/shared/forms/markdown-textarea.component.ts +++ b/client/src/app/shared/forms/markdown-textarea.component.ts | |||
@@ -1,10 +1,9 @@ | |||
1 | import { debounceTime, distinctUntilChanged } from 'rxjs/operators' | ||
1 | import { Component, forwardRef, Input, OnInit } from '@angular/core' | 2 | import { Component, forwardRef, Input, OnInit } from '@angular/core' |
2 | import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' | 3 | import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' |
3 | import 'rxjs/add/operator/debounceTime' | ||
4 | import 'rxjs/add/operator/distinctUntilChanged' | ||
5 | import { isInSmallView } from '@app/shared/misc/utils' | 4 | import { isInSmallView } from '@app/shared/misc/utils' |
6 | import { MarkdownService } from '@app/videos/shared' | 5 | import { MarkdownService } from '@app/videos/shared' |
7 | import { Subject } from 'rxjs/Subject' | 6 | import { Subject } from 'rxjs' |
8 | import truncate from 'lodash-es/truncate' | 7 | import truncate from 'lodash-es/truncate' |
9 | 8 | ||
10 | @Component({ | 9 | @Component({ |
@@ -40,9 +39,11 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit { | |||
40 | 39 | ||
41 | ngOnInit () { | 40 | ngOnInit () { |
42 | this.contentChanged | 41 | this.contentChanged |
43 | .debounceTime(150) | 42 | .pipe( |
44 | .distinctUntilChanged() | 43 | debounceTime(150), |
45 | .subscribe(() => this.updatePreviews()) | 44 | distinctUntilChanged() |
45 | ) | ||
46 | .subscribe(() => this.updatePreviews()) | ||
46 | 47 | ||
47 | this.contentChanged.next(this.content) | 48 | this.contentChanged.next(this.content) |
48 | 49 | ||