Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,8 @@ private void showNearbyCardPermissionRationale() {
DialogUtil.showAlertDialog(getActivity(),
getString(R.string.nearby_card_permission_title),
getString(R.string.nearby_card_permission_explanation),
this::displayYouWontSeeNearbyMessage,
this::requestLocationPermission,
this::displayYouWontSeeNearbyMessage,
checkBoxView,
false);
}
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/fr/free/nrw/commons/quiz/QuizChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ private void callQuiz(Activity activity) {
activity.getString(R.string.quiz_alert_message, REVERT_PERCENTAGE_FOR_MESSAGE),
activity.getString(R.string.about_translate_proceed),
activity.getString(android.R.string.cancel),
() -> startQuizActivity(activity), null);
() -> startQuizActivity(activity),
null);
}

private void startQuizActivity(Activity activity) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,11 @@ public void showNoCategorySelected() {
DialogUtil.showAlertDialog(getActivity(),
getString(R.string.no_categories_selected),
getString(R.string.no_categories_selected_warning_desc),
getString(R.string.no_go_back),
getString(R.string.yes_submit),
null,
() -> goToNextScreen());
getString(R.string.no_go_back),
() -> goToNextScreen(),
null);

}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,11 @@ public void showDuplicatePicturePopup() {
String.format(Locale.getDefault(),
uploadTitleFormat,
uploadItem.getFileName()),
() -> {

},
() -> {
uploadItem.setImageQuality(ImageUtils.IMAGE_KEEP);
onNextButtonClicked();
});
}, null);

}

@Override
Expand All @@ -370,11 +368,12 @@ public void showBadImagePopup(Integer errorCode) {
DialogUtil.showAlertDialog(getActivity(),
getString(R.string.warning),
errorMessageForResult,
() -> deleteThisPicture(),
() -> {
uploadItem.setImageQuality(ImageUtils.IMAGE_KEEP);
onNextButtonClicked();
});
},
() -> deleteThisPicture()
);
}
//If the error message is null, we will probably not show anything
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/fr/free/nrw/commons/utils/DialogUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public static void showAlertDialog(Activity activity,
showAlertDialog(activity,
title,
message,
activity.getString(R.string.no),
activity.getString(R.string.yes),
activity.getString(R.string.no),
onPositiveBtnClick,
onNegativeBtnClick);
}
Expand Down Expand Up @@ -96,8 +96,8 @@ public static void showAlertDialog(Activity activity,
showAlertDialog(activity,
title,
message,
activity.getString(R.string.no),
activity.getString(R.string.yes),
activity.getString(R.string.no),
onPositiveBtnClick,
onNegativeBtnClick,
customView,
Expand Down