mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 06:05:42 +03:00
Fix missing title in ConfirmationDialogFragment
Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com>
This commit is contained in:
parent
b188af0aca
commit
514f19eb87
1 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue