1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 10:19:35 +02:00

Upgrade to rxjs 6

This commit is contained in:
Chocobozzz 2018-05-15 11:55:51 +02:00
parent 54c3a22faa
commit db400f447a
No known key found for this signature in database
GPG key ID: 583A612D890159BE
44 changed files with 416 additions and 383 deletions

View file

@ -1,10 +1,9 @@
import { debounceTime, distinctUntilChanged } from 'rxjs/operators'
import { Component, forwardRef, Input, OnInit } from '@angular/core'
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'
import 'rxjs/add/operator/debounceTime'
import 'rxjs/add/operator/distinctUntilChanged'
import { isInSmallView } from '@app/shared/misc/utils'
import { MarkdownService } from '@app/videos/shared'
import { Subject } from 'rxjs/Subject'
import { Subject } from 'rxjs'
import truncate from 'lodash-es/truncate'
@Component({
@ -40,9 +39,11 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit {
ngOnInit () {
this.contentChanged
.debounceTime(150)
.distinctUntilChanged()
.subscribe(() => this.updatePreviews())
.pipe(
debounceTime(150),
distinctUntilChanged()
)
.subscribe(() => this.updatePreviews())
this.contentChanged.next(this.content)