fixup showing an error when opening info dialogue on sync waiting

This commit is contained in:
Henry Hiles 2026-10-15 10:02:43 -04:00
commit ed2d08ed40
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -33,7 +33,7 @@ class const SyncStatusBanner({super.key}) extends ConsumerWidget {
}; };
final details = status == null final details = status == null
? null ? []
: [ : [
?status.error, ?status.error,
if (status.errorCount > 0) "Failed attempts: ${status.errorCount}.", if (status.errorCount > 0) "Failed attempts: ${status.errorCount}.",
@ -49,7 +49,7 @@ class const SyncStatusBanner({super.key}) extends ConsumerWidget {
: Material( : Material(
color: banner.background, color: banner.background,
child: InkWell( child: InkWell(
onTap: details == null onTap: details.isEmpty
? null ? null
: () => showDialog( : () => showDialog(
context: context, context: context,
@ -73,7 +73,7 @@ class const SyncStatusBanner({super.key}) extends ConsumerWidget {
), ),
), ),
), ),
if (details != null) if (details.isNotEmpty)
Icon(Icons.info_outline, color: banner.foreground), Icon(Icons.info_outline, color: banner.foreground),
], ],
), ),