From e0fe2c5475279d175cb02ac3a8d588f291d3ad01 Mon Sep 17 00:00:00 2001 From: Devansh Date: Mon, 16 Sep 2024 19:41:27 +0530 Subject: [PATCH] Removed extra variable usage --- .../activities/FormEntryActivityUIController.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/org/commcare/activities/FormEntryActivityUIController.java b/app/src/org/commcare/activities/FormEntryActivityUIController.java index 36e3614bd8..e06b0da10b 100644 --- a/app/src/org/commcare/activities/FormEntryActivityUIController.java +++ b/app/src/org/commcare/activities/FormEntryActivityUIController.java @@ -500,9 +500,9 @@ private void createRepeatDialog() { String backText = Localization.get("repeat.dialog.go.back"); boolean hasRepetitions = FormEntryActivity.mFormController.getLastRepeatCount() > 0; - String addAnotherText = repeatCaptionPrompt.getRepeatText(hasRepetitions ? "add" : "add-empty"); + final String addAnotherText = repeatCaptionPrompt.getRepeatText(hasRepetitions ? "add" : "add-empty"); - String title, skipText; + String skipText; if (!nextExitsForm) { skipText = Localization.get("repeat.dialog.leave"); @@ -510,11 +510,9 @@ private void createRepeatDialog() { skipText = Localization.get("repeat.dialog.exit"); } - title = addAnotherText; - // Create the choice dialog ContextThemeWrapper wrapper = new ContextThemeWrapper(activity, R.style.DialogBaseTheme); - final PaneledChoiceDialog dialog = new HorizontalPaneledChoiceDialog(wrapper, title); + final PaneledChoiceDialog dialog = new HorizontalPaneledChoiceDialog(wrapper, addAnotherText); // Panel 1: Back option View.OnClickListener backListener = v -> {