]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts
Lazy load static objects
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / video-blacklist-list / video-blacklist-list.component.ts
index f4bce7c48a69de977210e7eb7aa6b2a4720ed88f..5876f658b0856cc0a50a2fe5f90dd4d47e023095 100644 (file)
@@ -33,11 +33,18 @@ export class VideoBlacklistListComponent extends RestTable implements OnInit {
     private i18n: I18n
   ) {
     super()
+  }
 
-    // don't filter if auto-blacklist not enabled as this will be only list
-    if (this.serverService.getConfig().autoBlacklist.videos.ofUsers.enabled) {
-      this.listBlacklistTypeFilter = VideoBlacklistType.MANUAL
-    }
+  ngOnInit () {
+    this.serverService.getConfig()
+        .subscribe(config => {
+          // don't filter if auto-blacklist not enabled as this will be only list
+          if (config.autoBlacklist.videos.ofUsers.enabled) {
+            this.listBlacklistTypeFilter = VideoBlacklistType.MANUAL
+          }
+        })
+
+    this.initialize()
 
     this.videoBlacklistActions = [
       {
@@ -47,10 +54,6 @@ export class VideoBlacklistListComponent extends RestTable implements OnInit {
     ]
   }
 
-  ngOnInit () {
-    this.initialize()
-  }
-
   getVideoUrl (videoBlacklist: VideoBlacklist) {
     return Video.buildClientUrl(videoBlacklist.video.uuid)
   }