1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

Remove dead code (#1787)

* Remove dead analytics code
This commit is contained in:
Oscar Hinton
2021-04-14 23:43:09 +02:00
committed by GitHub
parent dd6b08bb2c
commit 44463e7bc0
19 changed files with 23 additions and 197 deletions

View File

@@ -4,10 +4,8 @@ import {
BodyOutputType,
Toast,
ToasterConfig,
ToasterContainerComponent,
ToasterService,
} from 'angular2-toaster';
import { Angulartics2GoogleAnalytics } from 'angulartics2/ga';
import Swal, { SweetAlertIcon } from 'sweetalert2/src/sweetalert2.js';
import {
@@ -24,8 +22,6 @@ import {
RouterOutlet,
} from '@angular/router';
import { Angulartics2 } from 'angulartics2';
import { BroadcasterService } from 'jslib/angular/services/broadcaster.service';
import { AuthService } from 'jslib/abstractions/auth.service';
@@ -61,8 +57,7 @@ export class AppComponent implements OnInit {
private lastActivity: number = null;
constructor(private angulartics2GoogleAnalytics: Angulartics2GoogleAnalytics, private analytics: Angulartics2,
private toasterService: ToasterService, private storageService: StorageService,
constructor(private toasterService: ToasterService, private storageService: StorageService,
private broadcasterService: BroadcasterService, private authService: AuthService,
private i18nService: I18nService, private router: Router,
private stateService: StateService, private messagingService: MessagingService,
@@ -87,7 +82,6 @@ export class AppComponent implements OnInit {
if (msg.command === 'doneLoggingOut') {
this.ngZone.run(async () => {
this.authService.logOut(() => {
this.analytics.eventTrack.next({ action: 'Logged Out' });
if (msg.expired) {
this.showToast({
type: 'warning',
@@ -115,11 +109,6 @@ export class AppComponent implements OnInit {
this.ngZone.run(() => {
this.showToast(msg);
});
} else if (msg.command === 'analyticsEventTrack') {
this.analytics.eventTrack.next({
action: msg.action,
properties: { label: msg.label },
});
} else if (msg.command === 'reloadProcess') {
const windowReload = this.platformUtilsService.isSafari() ||
this.platformUtilsService.isFirefox() || this.platformUtilsService.isOpera();