Skip to content

Commit

Permalink
Fix missing title in ConfirmationDialogFragment
Browse files Browse the repository at this point in the history
Signed-off-by: ZetaTom <[email protected]>
  • Loading branch information
ZetaTom committed Nov 1, 2023
1 parent b188af0 commit 514f19e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 514f19e

Please sign in to comment.