fix: Prevent URLs and GIF links from being displayed as text content below media messages.
This commit is contained in:
@@ -312,11 +312,16 @@ class _MenuDrawer extends ConsumerWidget {
|
||||
),
|
||||
|
||||
// Bottom section: Log Out or Login buttons
|
||||
Padding(
|
||||
SafeArea(
|
||||
top: false,
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
|
||||
child: isAuthenticated
|
||||
? // Log Out button - filled orange
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
if (isAuthenticated) ...[
|
||||
// Log Out button - filled orange
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
height: 54,
|
||||
@@ -347,11 +352,9 @@ class _MenuDrawer extends ConsumerWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: // Login / Sign Up buttons
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
),
|
||||
] else ...[
|
||||
// Login button
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
height: 54,
|
||||
@@ -384,6 +387,7 @@ class _MenuDrawer extends ConsumerWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
// Sign Up button
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
height: 54,
|
||||
@@ -418,19 +422,15 @@ class _MenuDrawer extends ConsumerWidget {
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
// Version number
|
||||
const SizedBox(height: 12),
|
||||
FutureBuilder<PackageInfo>(
|
||||
future: PackageInfo.fromPlatform(),
|
||||
builder: (context, snapshot) {
|
||||
final version = snapshot.hasData
|
||||
? 'v${snapshot.data!.version} (${snapshot.data!.buildNumber})'
|
||||
: '';
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(bottom: 16),
|
||||
child: Text(
|
||||
return Text(
|
||||
version,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
@@ -438,12 +438,15 @@ class _MenuDrawer extends ConsumerWidget {
|
||||
fontWeight: FontWeight.w400,
|
||||
color: AppColors.hintText,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -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