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:
@@ -211,9 +211,6 @@ export class BrowserApi {
|
|||||||
|
|
||||||
private static registeredMessageListeners: any[] = [];
|
private static registeredMessageListeners: any[] = [];
|
||||||
|
|
||||||
/**
|
|
||||||
* Use ngzone.run() to ensure callback run inside the Angular zone.
|
|
||||||
*/
|
|
||||||
static messageListener(
|
static messageListener(
|
||||||
name: string,
|
name: string,
|
||||||
callback: (message: any, sender: chrome.runtime.MessageSender, response: any) => unknown
|
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$() {
|
static messageListener$() {
|
||||||
return new Observable<unknown>((subscriber) => {
|
return new Observable<unknown>((subscriber) => {
|
||||||
const handler = (message: unknown) => {
|
const handler = (message: unknown) => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Injectable } from "@angular/core";
|
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 { filter } from "rxjs";
|
||||||
|
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
@@ -39,12 +39,4 @@ export class BrowserRouterService {
|
|||||||
async setPreviousUrl(url: string) {
|
async setPreviousUrl(url: string) {
|
||||||
await this.stateService.setPreviousUrl(url);
|
await this.stateService.setPreviousUrl(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
private getDeepestChild(activatedRoute: ActivatedRoute): ActivatedRoute {
|
|
||||||
let child = activatedRoute;
|
|
||||||
while (child.firstChild) {
|
|
||||||
child = child.firstChild;
|
|
||||||
}
|
|
||||||
return child;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user