diff --git a/lib/routes/home/widgets/payments_list/dialog/payment_details_dialog_content_title.dart b/lib/routes/home/widgets/payments_list/dialog/payment_details_dialog_content_title.dart index fd34d48f5..7fc18b2ce 100644 --- a/lib/routes/home/widgets/payments_list/dialog/payment_details_dialog_content_title.dart +++ b/lib/routes/home/widgets/payments_list/dialog/payment_details_dialog_content_title.dart @@ -13,10 +13,10 @@ class PaymentDetailsDialogContentTitle extends StatelessWidget { @override Widget build(BuildContext context) { final themeData = Theme.of(context); - final title = paymentInfo.dialogTitle?.replaceAll("\n", " ")?.trim(); + final dialogTitle = paymentInfo.dialogTitle?.replaceAll("\n", " ")?.trim(); final description = paymentInfo.description?.trim(); - - if (title == null || title.isEmpty) { + final hasNoDescription = description == null || description.isEmpty || dialogTitle == description; + if (dialogTitle == null || dialogTitle.isEmpty) { return Container(); } @@ -24,10 +24,10 @@ class PaymentDetailsDialogContentTitle extends StatelessWidget { padding: EdgeInsets.only( left: 16.0, right: 16.0, - bottom: (description == null || description.isEmpty) ? 16 : 8, + bottom: (hasNoDescription) ? 16 : 8, ), child: AutoSizeText( - title, + dialogTitle, style: themeData.primaryTextTheme.headlineSmall, textAlign: TextAlign.center, overflow: TextOverflow.ellipsis, diff --git a/lib/routes/home/widgets/payments_list/dialog/payment_details_dialog_description.dart b/lib/routes/home/widgets/payments_list/dialog/payment_details_dialog_description.dart index 058150110..68ee27871 100644 --- a/lib/routes/home/widgets/payments_list/dialog/payment_details_dialog_description.dart +++ b/lib/routes/home/widgets/payments_list/dialog/payment_details_dialog_description.dart @@ -14,8 +14,10 @@ class PaymentDetailsDialogDescription extends StatelessWidget { Widget build(BuildContext context) { final themeData = Theme.of(context); - final description = paymentInfo.description; - if (description == null || description == "") { + final dialogTitle = paymentInfo.dialogTitle?.replaceAll("\n", " ")?.trim(); + final description = paymentInfo.description?.trim(); + final hasNoDescription = description == null || description.isEmpty || dialogTitle == description; + if (hasNoDescription) { return Container(); }