🐛 Fix markdown image in chat close #167

This commit is contained in:
2025-08-16 02:14:44 +08:00
parent 0ab908dd2a
commit 2b80ebc2d0
6 changed files with 42 additions and 32 deletions

View File

@@ -57,11 +57,11 @@ class EmbedLinkWidget extends StatelessWidget {
Row(
children: [
// Favicon
if (link.faviconUrl.isNotEmpty) ...[
if (link.faviconUrl?.isNotEmpty ?? false) ...[
ClipRRect(
borderRadius: BorderRadius.circular(4),
child: UniversalImage(
uri: link.faviconUrl,
uri: link.faviconUrl!,
width: 16,
height: 16,
fit: BoxFit.cover,
@@ -80,8 +80,8 @@ class EmbedLinkWidget extends StatelessWidget {
// Site name
Expanded(
child: Text(
link.siteName.isNotEmpty
? link.siteName
(link.siteName?.isNotEmpty ?? false)
? link.siteName!
: Uri.parse(link.url).host,
style: theme.textTheme.bodySmall?.copyWith(
color: colorScheme.onSurfaceVariant,