Skip to content

Commit

Permalink
fix eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bsatarnejad committed Nov 4, 2024
1 parent c36f13c commit b7e253c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions frontend/src/app/core/main-menu/main-menu-toggle.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
// See COPYRIGHT and LICENSE files for more details.
//++

import { Injectable, Injector, OnInit } from '@angular/core';
import { Injectable, Injector } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import { I18nService } from 'core-app/core/i18n/i18n.service';
import { CurrentProjectService } from 'core-app/core/current-project/current-project.service';
import { DeviceService } from 'core-app/core/browser/device.service';
import { InjectField } from 'core-app/shared/helpers/angular/inject-field.decorator';

@Injectable({ providedIn: 'root' })
export class MainMenuToggleService implements OnInit {
export class MainMenuToggleService {
public toggleTitle:string;

private elementWidth:number;
Expand Down Expand Up @@ -74,14 +74,11 @@ export class MainMenuToggleService implements OnInit {
public injector:Injector,
readonly deviceService:DeviceService,
) {
this.initializeMenu();
// Add resize event listener
window.addEventListener('resize', this.onWindowResize.bind(this));
}

public ngOnInit():void {
this.initializeMenu();
}

public initializeMenu():void {
if (!this.mainMenu) {
return;
Expand Down Expand Up @@ -147,7 +144,7 @@ export class MainMenuToggleService implements OnInit {
jQuery('.searchable-menu--search-input').blur();
}

public openMenu(): void {
public openMenu():void {
this.setWidth(this.defaultWidth);
this.wasCollapsedByUser = false;
window.OpenProject.guardedLocalStorage(this.localStorageStateKey, 'false');
Expand Down

0 comments on commit b7e253c

Please sign in to comment.