Skip to content

Commit

Permalink
fix: stray import stuff being wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesjo committed Sep 17, 2020
1 parent 708aa3d commit b2fae30
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/app/imex/sync/data-import.service.ts
Expand Up @@ -25,7 +25,7 @@ export class DataImportService {
private _migrationService: MigrationService,
private _dataInitService: DataInitService,
) {
this._checkForStrayBackup();
this._isCheckForStrayBackupAndImport();
}

async getCompleteSyncData(): Promise<AppDataComplete> {
Expand All @@ -38,11 +38,7 @@ export class DataImportService {

// get rid of outdated project data
if (!isBackupReload) {
const isBackupWasRestored = await this._checkForStrayBackup();
console.log(isBackupReload);
console.log(isBackupWasRestored);

if (!isBackupWasRestored) {
if (await this._isCheckForStrayBackupAndImport()) {
return;
}

Expand Down Expand Up @@ -91,7 +87,7 @@ export class DataImportService {
return this.importCompleteSyncData(data, true);
}

private async _checkForStrayBackup(): Promise<boolean> {
private async _isCheckForStrayBackupAndImport(): Promise<boolean> {
const backup = await this._persistenceService.loadBackup();
if (!localStorage.getItem(LS_CHECK_STRAY_PERSISTENCE_BACKUP)) {
if (backup) {
Expand Down

0 comments on commit b2fae30

Please sign in to comment.