Skip to content
Merged
Changes from 3 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
7 changes: 7 additions & 0 deletions app/src/main/java/fr/free/nrw/commons/utils/DialogUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ private static void showAlertDialog(Activity activity,
final Runnable onNegativeBtnClick,
View customView,
boolean cancelable) {
// If the custom view already has a parent, there is already a dialog showing with the view
// This happens for on resume - return to avoid creating a second dialog - the first one
// will still show
if (customView != null && customView.getParent() != null) {
return;
}

AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(title);
builder.setMessage(message);
Expand Down