1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

removed unused comments and method

This commit is contained in:
gbubemismith
2023-09-07 16:38:26 -04:00
parent fa27583ab8
commit 05097f233a
2 changed files with 1 additions and 20 deletions

View File

@@ -211,9 +211,6 @@ export class BrowserApi {
private static registeredMessageListeners: any[] = [];
/**
* Use ngzone.run() to ensure callback run inside the Angular zone.
*/
static messageListener(
name: string,
callback: (message: any, sender: chrome.runtime.MessageSender, response: any) => unknown
@@ -246,14 +243,6 @@ export class BrowserApi {
}
}
/**
* Creates an observable that listens for messages. While this observable might
* operate outside the Angular zone, it's recommended to pipe it with the
* utility function `runInsideAngular` to ensure proper triggering of change detection
* and other zone-related behaviors.
*
* @see /libs/angular/src/utils/run-inside-angular.operator.ts
*/
static messageListener$() {
return new Observable<unknown>((subscriber) => {
const handler = (message: unknown) => {

View File

@@ -1,5 +1,5 @@
import { Injectable } from "@angular/core";
import { ActivatedRoute, ActivatedRouteSnapshot, NavigationEnd, Router } from "@angular/router";
import { ActivatedRouteSnapshot, NavigationEnd, Router } from "@angular/router";
import { filter } from "rxjs";
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
@@ -39,12 +39,4 @@ export class BrowserRouterService {
async setPreviousUrl(url: string) {
await this.stateService.setPreviousUrl(url);
}
private getDeepestChild(activatedRoute: ActivatedRoute): ActivatedRoute {
let child = activatedRoute;
while (child.firstChild) {
child = child.firstChild;
}
return child;
}
}