fix last message preview. it had a white space in front
This commit is contained in:
@@ -161,21 +161,21 @@ class ChannelPreview extends StatelessWidget {
|
|||||||
if (lastMessage.isDeleted) {
|
if (lastMessage.isDeleted) {
|
||||||
text = 'This message was deleted.';
|
text = 'This message was deleted.';
|
||||||
} else if (lastMessage.attachments != null) {
|
} else if (lastMessage.attachments != null) {
|
||||||
final prefix = lastMessage.attachments
|
final parts = <String>[
|
||||||
.map((e) {
|
...lastMessage.attachments.map((e) {
|
||||||
if (e.type == 'image') {
|
if (e.type == 'image') {
|
||||||
return '📷';
|
return '📷';
|
||||||
} else if (e.type == 'video') {
|
} else if (e.type == 'video') {
|
||||||
return '🎬';
|
return '🎬';
|
||||||
} else if (e.type == 'giphy') {
|
} else if (e.type == 'giphy') {
|
||||||
return 'GIF';
|
return '[GIF]';
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
})
|
}).where((e) => e != null),
|
||||||
.where((e) => e != null)
|
lastMessage.text ?? '',
|
||||||
.join(' ');
|
];
|
||||||
|
|
||||||
text = '$prefix ${lastMessage.text ?? ''}';
|
text = parts.join(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
return Text(
|
return Text(
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ class SendingIndicator extends StatelessWidget {
|
|||||||
return Icon(
|
return Icon(
|
||||||
Icons.done,
|
Icons.done,
|
||||||
size: 8,
|
size: 8,
|
||||||
|
color: IconTheme.of(context).color.withOpacity(0.5),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (message.status == MessageSendingStatus.SENDING ||
|
if (message.status == MessageSendingStatus.SENDING ||
|
||||||
|
|||||||
Reference in New Issue
Block a user