From: Chocobozzz Date: Mon, 13 May 2019 13:18:11 +0000 (+0200) Subject: Lazy load dropdown info on click X-Git-Tag: v1.3.0-rc.1~9 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4da22f64e71166e7482cc2f04531c0c4a1f32e22;p=oweals%2Fpeertube.git Lazy load dropdown info on click Instead of mouseenter --- diff --git a/client/src/app/shared/video/video-actions-dropdown.component.html b/client/src/app/shared/video/video-actions-dropdown.component.html index 300fe318a..ec03fa55d 100644 --- a/client/src/app/shared/video/video-actions-dropdown.component.html +++ b/client/src/app/shared/video/video-actions-dropdown.component.html @@ -11,7 +11,7 @@ diff --git a/client/src/app/shared/video/video-actions-dropdown.component.ts b/client/src/app/shared/video/video-actions-dropdown.component.ts index c1da0eba6..ee2f44f9e 100644 --- a/client/src/app/shared/video/video-actions-dropdown.component.ts +++ b/client/src/app/shared/video/video-actions-dropdown.component.ts @@ -28,7 +28,7 @@ export type VideoActionsDisplayType = { templateUrl: './video-actions-dropdown.component.html', styleUrls: [ './video-actions-dropdown.component.scss' ] }) -export class VideoActionsDropdownComponent implements AfterViewInit, OnChanges { +export class VideoActionsDropdownComponent implements OnChanges { @ViewChild('playlistDropdown') playlistDropdown: NgbDropdown @ViewChild('playlistAdd') playlistAdd: VideoAddToPlaylistComponent @@ -78,13 +78,6 @@ export class VideoActionsDropdownComponent implements AfterViewInit, OnChanges { return this.authService.getUser() } - ngAfterViewInit () { - // We rely on mouseenter to lazy load actions - if (this.screenService.isInTouchScreen()) { - this.loadDropdownInformation() - } - } - ngOnChanges () { this.buildActions() }