mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 21:33:53 +01:00
make dialog modal (#6015)
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
This commit is contained in:
parent
c175a4ee03
commit
9a876fa5e2
27 changed files with 53 additions and 62 deletions
|
|
@ -79,7 +79,6 @@ object DialogUtil {
|
|||
onPositiveBtnClick: Runnable?,
|
||||
onNegativeBtnClick: Runnable?,
|
||||
customView: View?,
|
||||
cancelable: Boolean,
|
||||
): AlertDialog? =
|
||||
createAndShowDialogSafely(
|
||||
activity = activity,
|
||||
|
|
@ -90,7 +89,6 @@ object DialogUtil {
|
|||
onPositiveBtnClick = onPositiveBtnClick,
|
||||
onNegativeBtnClick = onNegativeBtnClick,
|
||||
customView = customView,
|
||||
cancelable = cancelable,
|
||||
)
|
||||
|
||||
@JvmStatic
|
||||
|
|
@ -103,7 +101,6 @@ object DialogUtil {
|
|||
onPositiveBtnClick: Runnable?,
|
||||
onNegativeBtnClick: Runnable?,
|
||||
customView: View?,
|
||||
cancelable: Boolean,
|
||||
): AlertDialog? =
|
||||
createAndShowDialogSafely(
|
||||
activity = activity,
|
||||
|
|
@ -114,7 +111,6 @@ object DialogUtil {
|
|||
onPositiveBtnClick = onPositiveBtnClick,
|
||||
onNegativeBtnClick = onNegativeBtnClick,
|
||||
customView = customView,
|
||||
cancelable = cancelable,
|
||||
)
|
||||
|
||||
@JvmStatic
|
||||
|
|
@ -124,7 +120,6 @@ object DialogUtil {
|
|||
message: String?,
|
||||
positiveButtonText: String?,
|
||||
onPositiveBtnClick: Runnable?,
|
||||
cancelable: Boolean,
|
||||
): AlertDialog? =
|
||||
createAndShowDialogSafely(
|
||||
activity = activity,
|
||||
|
|
@ -132,7 +127,6 @@ object DialogUtil {
|
|||
message = message,
|
||||
positiveButtonText = positiveButtonText,
|
||||
onPositiveBtnClick = onPositiveBtnClick,
|
||||
cancelable = cancelable,
|
||||
)
|
||||
|
||||
/**
|
||||
|
|
@ -156,7 +150,7 @@ object DialogUtil {
|
|||
onPositiveBtnClick: Runnable? = null,
|
||||
onNegativeBtnClick: Runnable? = null,
|
||||
customView: View? = null,
|
||||
cancelable: Boolean = true,
|
||||
cancelable: Boolean = false,
|
||||
): AlertDialog? {
|
||||
/* 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
|
||||
|
|
|
|||
|
|
@ -283,7 +283,8 @@ object ImageUtils {
|
|||
context,
|
||||
context.getString(R.string.setting_wallpaper_dialog_title),
|
||||
context.getString(R.string.setting_wallpaper_dialog_message),
|
||||
true
|
||||
true,
|
||||
false
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -293,7 +294,8 @@ object ImageUtils {
|
|||
context,
|
||||
context.getString(R.string.setting_avatar_dialog_title),
|
||||
context.getString(R.string.setting_avatar_dialog_message),
|
||||
true
|
||||
true,
|
||||
false
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ object PermissionUtils {
|
|||
activity.isShowPermissionsDialog = true
|
||||
}
|
||||
},
|
||||
null, null, activity !is UploadActivity
|
||||
null, null
|
||||
)
|
||||
}
|
||||
else -> Thread(onPermissionDenied).start()
|
||||
|
|
@ -223,7 +223,7 @@ object PermissionUtils {
|
|||
activity.finish()
|
||||
}
|
||||
},
|
||||
null, false
|
||||
null
|
||||
)
|
||||
}
|
||||
}).onSameThread().check()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue