make dialog modal (#6015)

Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
This commit is contained in:
Parneet Singh 2024-12-11 11:38:39 +05:30 committed by GitHub
parent c175a4ee03
commit 9a876fa5e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 53 additions and 62 deletions

View file

@ -1596,8 +1596,7 @@ class MediaDetailFragment : CommonsDaggerSupportFragment(), CategoryEditHelper.C
getString(R.string.about_translate_cancel),
{ onDeleteClicked(spinner) },
{},
spinner,
true
spinner
)
if (isDeleted) {
dialog!!.getButton(AlertDialog.BUTTON_POSITIVE).isEnabled = false
@ -1616,8 +1615,7 @@ class MediaDetailFragment : CommonsDaggerSupportFragment(), CategoryEditHelper.C
onDeleteClickeddialogtext(reason)
},
{},
input,
true
input
)
input.addTextChangedListener(object : TextWatcher {
fun handleText() {

View file

@ -283,6 +283,7 @@ public class MediaDetailPagerFragment extends CommonsDaggerSupportFragment imple
builder.setItems(R.array.report_violation_options, (dialog, which) -> {
sendReportEmail(media, values[which]);
});
builder.setCancelable(false);
builder.show();
}

View file

@ -196,6 +196,7 @@ class ZoomableActivity : BaseActivity() {
val dialog = Dialog(this)
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE)
dialog.setContentView(R.layout.full_screen_mode_info_dialog)
dialog.setCancelable(false)
(dialog.findViewById(R.id.btn_ok) as Button).setOnClickListener { dialog.dismiss() }
dialog.show()
}