From 8f4ff91573eb55136ce557ba4b9c503c732339ca Mon Sep 17 00:00:00 2001 From: himeshr Date: Fri, 27 Oct 2023 10:10:53 +0530 Subject: [PATCH] #1149 | Correct the updatedSyncSource value returned vy syncService.sync() --- packages/openchs-android/src/service/SyncService.js | 2 +- packages/openchs-android/src/views/SyncComponent.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/openchs-android/src/service/SyncService.js b/packages/openchs-android/src/service/SyncService.js index f8a337a59..c133c2060 100644 --- a/packages/openchs-android/src/service/SyncService.js +++ b/packages/openchs-android/src/service/SyncService.js @@ -80,7 +80,7 @@ class SyncService extends BaseService { .then(() => this.clearDataIn([RuleFailureTelemetry])) .then(() => this.downloadNewsImages()) .then(() => { - return isOnlyUploadRequired; + return updatedSyncSource; }); // Even blank dataServerSync with no data in or out takes quite a while. diff --git a/packages/openchs-android/src/views/SyncComponent.js b/packages/openchs-android/src/views/SyncComponent.js index c519eedf4..b8f320857 100644 --- a/packages/openchs-android/src/views/SyncComponent.js +++ b/packages/openchs-android/src/views/SyncComponent.js @@ -46,7 +46,7 @@ class SyncComponent extends AbstractComponent { _postSync() { this.setState({syncStarted: false}); this.dispatchAction(SyncActions.POST_SYNC); - this.context.getService(SyncService).resetServicesAfterFullSyncCompletion(SyncService.syncSources.BACKGROUND_JOB); + this.context.getService(SyncService).resetServicesAfterFullSyncCompletion(SyncService.syncSources.SYNC_BUTTON); General.logInfo(this.viewName(), 'Sync completed dispatching reset'); }