Fix missing title in ConfirmationDialogFragment

Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com>
This commit is contained in:
ZetaTom 2023-11-01 09:25:48 +01:00
parent b188af0aca
commit 514f19eb87
No known key found for this signature in database
GPG key ID: C705C33DC3B9BA5B

View file

@ -75,11 +75,16 @@ open class ConfirmationDialogFragment : DialogFragment(), Injectable {
val message = getString(messageId, *messageArguments)
val builder = MaterialAlertDialogBuilder(requireActivity())
.setTitle(if (titleId == 0) { R.string.dialog_alert_title } else { titleId })
.setIcon(com.owncloud.android.R.drawable.ic_warning)
.setIconAttribute(R.attr.alertDialogIcon)
.setMessage(message)
if (titleId == 0) {
builder.setTitle(R.string.dialog_alert_title)
} else if (titleId != -1) {
builder.setTitle(titleId)
}
if (positiveButtonTextId != -1) {
builder.setPositiveButton(positiveButtonTextId) { dialog: DialogInterface, _: Int ->
mListener?.onConfirmation(tag)