chat initial message bug fixed + attachment
This commit is contained in:
parent
b1616a1b51
commit
be6cc21b2a
|
|
@ -76,7 +76,12 @@ class DirectState extends CoreProvier {
|
|||
}
|
||||
|
||||
void _addToDailyGrouped() {
|
||||
final createdAt = messages.last.createdAt.split('T').first;
|
||||
String createdAt;
|
||||
if (messages.last.createdAt.contains('T')) {
|
||||
createdAt = messages.last.createdAt.split('T').first;
|
||||
} else {
|
||||
createdAt = messages.last.createdAt.split(' ').first;
|
||||
}
|
||||
if (!dailyMessages.containsKey(createdAt)) {
|
||||
dailyMessages.addAll({
|
||||
createdAt: [messages.last.id]
|
||||
|
|
@ -88,7 +93,6 @@ class DirectState extends CoreProvier {
|
|||
|
||||
Future<void> sendMessage() async {
|
||||
if ((text == null || text!.isEmpty) && recordedFile == null) return;
|
||||
replyRadar = null;
|
||||
messages.insert(
|
||||
0,
|
||||
MessageData(
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ class Message extends StatelessWidget {
|
|||
_MessageContainer(
|
||||
writedByAdmin: message.writedByAdmin,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (message.text != null) DidvanText(message.text!),
|
||||
if (message.audio != null || message.audioFile != null)
|
||||
|
|
|
|||
Loading…
Reference in New Issue