Fix duplicates in playlist add component (release branch)
authorChocobozzz <me@florianbigard.com>
Fri, 24 May 2019 10:02:34 +0000 (12:02 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 24 May 2019 10:02:34 +0000 (12:02 +0200)
client/src/app/shared/video-playlist/video-add-to-playlist.component.ts

index be15f23529f276ea4661f5cbda38cc88be7125b1..35cad9d14f857492f470ddbf3a87d6f5386341b4 100644 (file)
@@ -57,8 +57,6 @@ export class VideoAddToPlaylistComponent extends FormReactive implements OnInit,
     this.buildForm({
       displayName: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_DISPLAY_NAME
     })
-
-    this.init()
   }
 
   ngOnChanges (simpleChanges: SimpleChanges) {
@@ -67,7 +65,7 @@ export class VideoAddToPlaylistComponent extends FormReactive implements OnInit,
     }
   }
 
-  init () {
+  reload () {
     this.resetOptions(true)
 
     if (this.lazyLoad !== true) this.load()
@@ -76,7 +74,7 @@ export class VideoAddToPlaylistComponent extends FormReactive implements OnInit,
   unload () {
     this.videoPlaylists = []
 
-    this.init()
+    this.reload()
 
     this.cd.markForCheck()
   }