Skip to content

Commit

Permalink
Removed extra variable usage
Browse files Browse the repository at this point in the history
  • Loading branch information
devanshhooda committed Sep 16, 2024
1 parent d734ac6 commit e0fe2c5
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -500,21 +500,19 @@ 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");
} else {
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 -> {
Expand Down

0 comments on commit e0fe2c5

Please sign in to comment.