diff --git a/app/src/main/java/fr/free/nrw/commons/utils/DialogUtil.java b/app/src/main/java/fr/free/nrw/commons/utils/DialogUtil.java index 0ce8ca9c9e..911b0fc4f8 100644 --- a/app/src/main/java/fr/free/nrw/commons/utils/DialogUtil.java +++ b/app/src/main/java/fr/free/nrw/commons/utils/DialogUtil.java @@ -5,6 +5,7 @@ import android.app.Dialog; import android.content.DialogInterface; import android.view.View; +import android.view.ViewGroup; import org.apache.commons.lang3.StringUtils; @@ -116,6 +117,7 @@ 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