From 463f0eb2868cb06b40c653c466f669e26193f686 Mon Sep 17 00:00:00 2001 From: Mo Bitar Date: Tue, 22 Sep 2020 00:13:23 -0500 Subject: [PATCH] fix: remove unused code --- .../views/application/application_view.ts | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/app/assets/javascripts/views/application/application_view.ts b/app/assets/javascripts/views/application/application_view.ts index 375a26a8cc2..df0862162b0 100644 --- a/app/assets/javascripts/views/application/application_view.ts +++ b/app/assets/javascripts/views/application/application_view.ts @@ -29,7 +29,6 @@ class ApplicationViewCtrl extends PureViewCtrl { private showingDownloadStatus = false private uploadSyncStatus: any private lastAlertShownTimeStamp = 0; - private showingInvalidSessionAlert = false; /* @ngInject */ constructor( @@ -126,8 +125,6 @@ class ApplicationViewCtrl extends PureViewCtrl { this.syncStatus = this.application!.getStatusService().removeStatus(this.syncStatus); this.completedInitialSync = true; } - } else if (eventName === ApplicationEvent.InvalidSyncSession) { - this.showInvalidSessionAlert(); } else if (eventName === ApplicationEvent.LocalDatabaseReadError) { this.application!.alertService!.alert( 'Unable to load local database. Please restart the app and try again.' @@ -258,24 +255,6 @@ class ApplicationViewCtrl extends PureViewCtrl { this.application!.componentManager!.presentPermissionsDialog = this.presentPermissionsDialog; } - showInvalidSessionAlert() { - /** Don't show repeatedly; at most 30 seconds in between */ - const SHOW_INTERVAL = 30 * 1000; - if ( - !this.showingInvalidSessionAlert && - (Date.now() - this.lastAlertShownTimeStamp) > SHOW_INTERVAL - ) { - this.lastAlertShownTimeStamp = Date.now(); - this.showingInvalidSessionAlert = true; - setTimeout(async () => { - // await alertDialog({ - // text: STRING_SESSION_EXPIRED - // }); - this.showingInvalidSessionAlert = false; - }, 500); - } - } - addDragDropHandlers() { /** * Disable dragging and dropping of files (but allow text) into main SN interface.