fix(ui): Push chat title and body closer together
This commit is contained in:
parent
e1dd958959
commit
ba45728b57
@ -393,91 +393,91 @@ class ConversationCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Padding(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Expanded(
|
mainAxisSize: MainAxisSize.min,
|
||||||
child: Row(
|
children: [
|
||||||
children: [
|
Expanded(
|
||||||
if (conversation.favourite)
|
child: Row(
|
||||||
const _RowIcon(Icons.star_outline),
|
children: [
|
||||||
|
if (conversation.favourite)
|
||||||
if (conversation.isGroupchat)
|
const _RowIcon(Icons.star_outline),
|
||||||
const _RowIcon(Icons.public),
|
if (conversation.isGroupchat)
|
||||||
|
const _RowIcon(Icons.public),
|
||||||
if (conversation.muted)
|
if (conversation.muted)
|
||||||
const _RowIcon(Icons.notifications_off),
|
const _RowIcon(Icons.notifications_off),
|
||||||
|
Expanded(
|
||||||
Expanded(
|
child: Row(
|
||||||
child: Row(
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisSize: MainAxisSize.min,
|
children: [
|
||||||
children: [
|
HighlightWord(
|
||||||
HighlightWord(
|
text:
|
||||||
text: conversation.titleWithOptionalContact,
|
conversation.titleWithOptionalContact,
|
||||||
word: highlightWord,
|
word: highlightWord,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: ptToFontSize(32),
|
fontSize: ptToFontSize(32),
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
if (titleSuffixIcon != null)
|
||||||
if (titleSuffixIcon != null)
|
Padding(
|
||||||
Padding(
|
padding: const EdgeInsets.only(left: 8),
|
||||||
padding: const EdgeInsets.only(left: 8),
|
child: titleSuffixIcon,
|
||||||
child: titleSuffixIcon,
|
),
|
||||||
),
|
],
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Offstage(
|
|
||||||
offstage: !conversation.hasUnreads,
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
left: pxToLp(12),
|
|
||||||
right: pxToLp(24),
|
|
||||||
),
|
),
|
||||||
child: badges.Badge(
|
),
|
||||||
badgeStyle: badges.BadgeStyle(
|
Offstage(
|
||||||
badgeColor:
|
offstage: !conversation.hasUnreads,
|
||||||
Theme.of(context).colorScheme.primary,
|
child: Padding(
|
||||||
padding: EdgeInsets.all(
|
padding: EdgeInsets.only(
|
||||||
pxToLp(16),
|
left: pxToLp(12),
|
||||||
),
|
right: pxToLp(24),
|
||||||
),
|
),
|
||||||
badgeContent: Text(
|
child: badges.Badge(
|
||||||
conversation.unreadsString,
|
badgeStyle: badges.BadgeStyle(
|
||||||
style: TextStyle(
|
badgeColor:
|
||||||
color: Theme.of(context)
|
Theme.of(context).colorScheme.primary,
|
||||||
.colorScheme
|
padding: EdgeInsets.all(
|
||||||
.onPrimary,
|
pxToLp(16),
|
||||||
fontSize: ptToFontSize(24),
|
),
|
||||||
|
),
|
||||||
|
badgeContent: Text(
|
||||||
|
conversation.unreadsString,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.onPrimary,
|
||||||
|
fontSize: ptToFontSize(24),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
if (showTimestamp)
|
||||||
|
Text(
|
||||||
if (showTimestamp)
|
formatConversationTimestamp(
|
||||||
Text(
|
conversation.lastChangeTimestamp,
|
||||||
formatConversationTimestamp(
|
DateTime.now().millisecondsSinceEpoch,
|
||||||
conversation.lastChangeTimestamp,
|
),
|
||||||
DateTime.now().millisecondsSinceEpoch,
|
style: TextStyle(
|
||||||
|
fontSize: ptToFontSize(24),
|
||||||
|
color: conversation.hasUnreads
|
||||||
|
? Theme.of(context).colorScheme.primary
|
||||||
|
: Theme.of(context).colorScheme.outline,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
style: TextStyle(
|
],
|
||||||
fontSize: ptToFontSize(24),
|
),
|
||||||
color: conversation.hasUnreads
|
|
||||||
? Theme.of(context).colorScheme.primary
|
|
||||||
: Theme.of(context).colorScheme.outline,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
Expanded(
|
||||||
Expanded(
|
child: _renderLastMessage(context, sentBySelf),
|
||||||
child: _renderLastMessage(context, sentBySelf),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user