]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+my-library/my-history/my-history.component.ts
Add more when deleting a video
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-library / my-history / my-history.component.ts
index fe6e863467c9b852631ed437bb4c741f2b7c8de8..95cfaee417d08c260eff84e997de97899fa8d40f 100644 (file)
@@ -1,4 +1,3 @@
-import { Subject } from 'rxjs'
 import { tap } from 'rxjs/operators'
 import { Component, ComponentFactoryResolver, OnInit, ViewChild } from '@angular/core'
 import { ActivatedRoute, Router } from '@angular/router'
@@ -51,6 +50,8 @@ export class MyHistoryComponent implements OnInit, DisableForReuseHook {
   videos: Video[] = []
   search: string
 
+  disabled = false
+
   constructor (
     protected router: Router,
     protected serverService: ServerService,
@@ -75,11 +76,11 @@ export class MyHistoryComponent implements OnInit, DisableForReuseHook {
   }
 
   disableForReuse () {
-    this.videosSelection.disableForReuse()
+    this.disabled = true
   }
 
   enabledForReuse () {
-    this.videosSelection.enabledForReuse()
+    this.disabled = false
   }
 
   reloadData () {
@@ -109,9 +110,9 @@ export class MyHistoryComponent implements OnInit, DisableForReuseHook {
     this.userService.updateMyProfile({ videosHistoryEnabled: this.videosHistoryEnabled })
       .subscribe({
         next: () => {
-          const message = this.videosHistoryEnabled === true ?
-            $localize`Videos history is enabled` :
-            $localize`Videos history is disabled`
+          const message = this.videosHistoryEnabled === true
+            ? $localize`Videos history is enabled`
+            $localize`Videos history is disabled`
 
           this.notifier.success(message)