aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/forms
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-15 11:55:51 +0200
committerChocobozzz <me@florianbigard.com>2018-05-16 09:42:54 +0200
commitdb400f447a9f7aae1c56fa25396e93069744483f (patch)
treef45af832a5d3f4eebafd2f885b7413d9f84fa374 /client/src/app/shared/forms
parent54c3a22faa04bf13eea37f39be9149fc5eb95737 (diff)
downloadPeerTube-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.ts13
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 @@
1import { debounceTime, distinctUntilChanged } from 'rxjs/operators'
1import { Component, forwardRef, Input, OnInit } from '@angular/core' 2import { Component, forwardRef, Input, OnInit } from '@angular/core'
2import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' 3import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'
3import 'rxjs/add/operator/debounceTime'
4import 'rxjs/add/operator/distinctUntilChanged'
5import { isInSmallView } from '@app/shared/misc/utils' 4import { isInSmallView } from '@app/shared/misc/utils'
6import { MarkdownService } from '@app/videos/shared' 5import { MarkdownService } from '@app/videos/shared'
7import { Subject } from 'rxjs/Subject' 6import { Subject } from 'rxjs'
8import truncate from 'lodash-es/truncate' 7import 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