From 6693df9dd60e6966186bcb7765218596de7b65c0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 31 Jan 2018 10:42:01 +0100 Subject: Hide description previews on mobile view --- client/src/app/app.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'client/src/app/app.component.ts') diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 584640290..d2678096f 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core' import { NavigationEnd, Router } from '@angular/router' import { AuthService, ServerService } from '@app/core' +import { isInMobileView } from '@app/shared/misc/utils' @Component({ selector: 'my-app', @@ -49,14 +50,14 @@ export class AppComponent implements OnInit { this.serverService.loadVideoPrivacies() // Do not display menu on small screens - if (window.innerWidth < 600) { + if (isInMobileView()) { this.isMenuDisplayed = false } this.router.events.subscribe( e => { // User clicked on a link in the menu, change the page - if (e instanceof NavigationEnd && window.innerWidth < 600) { + if (e instanceof NavigationEnd && isInMobileView()) { this.isMenuDisplayed = false } } -- cgit v1.2.3