diff --git a/client/wfnews-war/src/main/angular/src/app/services/common-utility.service.ts b/client/wfnews-war/src/main/angular/src/app/services/common-utility.service.ts index f7943b545e..8fae843ffd 100644 --- a/client/wfnews-war/src/main/angular/src/app/services/common-utility.service.ts +++ b/client/wfnews-war/src/main/angular/src/app/services/common-utility.service.ts @@ -181,11 +181,10 @@ valueMatch = trimmedAddress.substring(0, valueLength); }, ); }) - + return promise; } - async checkLocationServiceStatus(): Promise { const timeoutDuration = 5000; // 5 seconds limit @@ -236,14 +235,8 @@ valueMatch = trimmedAddress.substring(0, valueLength); async syncDataWithServer() { await this.storage.create(); try { - let offlineReport; - // Fetch and submit locally stored data - // Set timeout between 10 and 30 seconds - const random = Math.floor((Math.random()*30000)+10000); - setTimeout(async () => { - offlineReport = await this.storage.get('offlineReportData'); - }, random); + const offlineReport = await this.storage.get('offlineReportData'); if (offlineReport) { // Send the report to the server