fix last message preview. it had a white space in front

This commit is contained in:
Salvatore Giordano
2020-07-08 10:59:48 +02:00
parent eb5517aca3
commit 28aeb1a1a4
2 changed files with 15 additions and 14 deletions
+14 -14
View File
@@ -161,21 +161,21 @@ class ChannelPreview extends StatelessWidget {
if (lastMessage.isDeleted) {
text = 'This message was deleted.';
} else if (lastMessage.attachments != null) {
final prefix = lastMessage.attachments
.map((e) {
if (e.type == 'image') {
return '📷';
} else if (e.type == 'video') {
return '🎬';
} else if (e.type == 'giphy') {
return 'GIF';
}
return null;
})
.where((e) => e != null)
.join(' ');
final parts = <String>[
...lastMessage.attachments.map((e) {
if (e.type == 'image') {
return '📷';
} else if (e.type == 'video') {
return '🎬';
} else if (e.type == 'giphy') {
return '[GIF]';
}
return null;
}).where((e) => e != null),
lastMessage.text ?? '',
];
text = '$prefix ${lastMessage.text ?? ''}';
text = parts.join(' ');
}
return Text(
+1
View File
@@ -24,6 +24,7 @@ class SendingIndicator extends StatelessWidget {
return Icon(
Icons.done,
size: 8,
color: IconTheme.of(context).color.withOpacity(0.5),
);
}
if (message.status == MessageSendingStatus.SENDING ||