]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/video/video-miniature.component.ts
Fix fragmented download URL
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / video / video-miniature.component.ts
index e3552abbaf4caa8297214b575e90f3ed62c2a1d1..d5c7dfd9b580cef5b3515f7dbfb4df4dedc9555e 100644 (file)
@@ -72,8 +72,9 @@ export class VideoMiniatureComponent implements OnInit {
   ngOnInit () {
     this.setUpBy()
 
-    if (this.screenService.isInSmallView()) {
-      this.showActions = true
+    // We rely on mouseenter to lazy load actions
+    if (this.screenService.isInTouchScreen()) {
+      this.loadActions()
     }
   }
 
@@ -94,6 +95,8 @@ export class VideoMiniatureComponent implements OnInit {
   }
 
   getStateLabel (video: Video) {
+    if (!video.state) return ''
+
     if (video.privacy.id !== VideoPrivacy.PRIVATE && video.state.id === VideoState.PUBLISHED) {
       return this.i18n('Published')
     }