diff --git a/app/src/org/commcare/activities/SyncCapableCommCareActivity.java b/app/src/org/commcare/activities/SyncCapableCommCareActivity.java index 0202ae5c16..d527bc5904 100644 --- a/app/src/org/commcare/activities/SyncCapableCommCareActivity.java +++ b/app/src/org/commcare/activities/SyncCapableCommCareActivity.java @@ -232,23 +232,23 @@ public void handleSyncNotAttempted(String message) { public void handleFormUploadResult(FormUploadResult result, String formLabel, boolean userTriggered) { switch (result) { case FULL_SUCCESS: - handleFormSendResult(formLabel, true); + updateUiForFormUploadResult(formLabel, true); break; case BAD_CERTIFICATE: CommCareApplication.notificationManager().reportNotificationMessage( NotificationMessageFactory.message(NotificationMessageFactory.StockMessages.BadSslCertificate, NotificationActionButtonInfo.ButtonAction.LAUNCH_DATE_SETTINGS)); - handleFormSendResult(Localization.get(result.getLocaleKeyBase()), false); + updateUiForFormUploadResult(Localization.get(result.getLocaleKeyBase()), false); break; case ACTIONABLE_FAILURE: - handleFormSendResult(result.getErrorMessage(), false); + updateUiForFormUploadResult(result.getErrorMessage(), false); break; case RATE_LIMITED: showRateLimitError(userTriggered); break; case CANCELLED: - handleFormSendResult(Localization.get(result.getLocaleKeyBase()) + updateUiForFormUploadResult(Localization.get(result.getLocaleKeyBase()) + " " + formLabel, false); break; case AUTH_FAILURE: @@ -258,12 +258,12 @@ public void handleFormUploadResult(FormUploadResult result, String formLabel, bo case INVALID_CASE_GRAPH: case FAILURE: default: - handleFormSendResult(Localization.get(result.getLocaleKeyBase()), false); + updateUiForFormUploadResult(Localization.get(result.getLocaleKeyBase()), false); break; } } - public void handleFormSendResult(String message, boolean success) { + public void updateUiForFormUploadResult(String message, boolean success) { updateUiAfterDataPullOrSend(message, success); if (success) { // Since we know that we just had connectivity, now is a great time to try this @@ -273,7 +273,7 @@ public void handleFormSendResult(String message, boolean success) { public void showRateLimitError(boolean userTriggered) { if (HiddenPreferences.isRateLimitPopupDisabled() || !userTriggered) { - handleFormUploadResult(FormUploadResult.RATE_LIMITED, null, userTriggered); + updateUiForFormUploadResult(Localization.get(FormUploadResult.RATE_LIMITED.getLocaleKeyBase()), false); return; } String title = Localization.get("form.send.rate.limit.error.title");