fix: Prevent URLs and GIF links from being displayed as text content below media messages.
This commit is contained in:
@@ -985,8 +985,10 @@ class _ChatScreenState extends ConsumerState<ChatScreen> {
|
||||
const SizedBox(height: 6),
|
||||
// Message content
|
||||
_buildMessageContent(message, isMine: true),
|
||||
// Show text content below media if present
|
||||
if (isMediaMessage && message.content.isNotEmpty)
|
||||
// Show text content below media if present (but not URLs/GIF links)
|
||||
if (isMediaMessage &&
|
||||
message.content.isNotEmpty &&
|
||||
!message.content.trim().startsWith('http'))
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 4),
|
||||
child: Text(
|
||||
@@ -1071,8 +1073,10 @@ class _ChatScreenState extends ConsumerState<ChatScreen> {
|
||||
const SizedBox(height: 6),
|
||||
// Message content
|
||||
_buildMessageContent(message, isMine: false),
|
||||
// Show text content below media if present
|
||||
if (isMediaMessage && message.content.isNotEmpty)
|
||||
// Show text content below media if present (but not URLs/GIF links)
|
||||
if (isMediaMessage &&
|
||||
message.content.isNotEmpty &&
|
||||
!message.content.trim().startsWith('http'))
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 4),
|
||||
child: Text(
|
||||
|
||||
Reference in New Issue
Block a user