Skip to content

Commit

Permalink
fix: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
moughxyz committed Sep 22, 2020
1 parent d42518f commit 463f0eb
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions app/assets/javascripts/views/application/application_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class ApplicationViewCtrl extends PureViewCtrl {
private showingDownloadStatus = false
private uploadSyncStatus: any
private lastAlertShownTimeStamp = 0;
private showingInvalidSessionAlert = false;

/* @ngInject */
constructor(
Expand Down Expand Up @@ -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.'
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 463f0eb

Please sign in to comment.