mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-06-18 00:16:26 +10:00
add icon, also misc improvments
This commit is contained in:
@@ -71,6 +71,7 @@ class ChannelMessageStore {
|
||||
'replyToMessageId': msg.replyToMessageId,
|
||||
'replyToSenderName': msg.replyToSenderName,
|
||||
'replyToText': msg.replyToText,
|
||||
'reactions': msg.reactions,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -104,6 +105,9 @@ class ChannelMessageStore {
|
||||
replyToMessageId: json['replyToMessageId'] as String?,
|
||||
replyToSenderName: json['replyToSenderName'] as String?,
|
||||
replyToText: json['replyToText'] as String?,
|
||||
reactions: (json['reactions'] as Map<String, dynamic>?)?.map(
|
||||
(key, value) => MapEntry(key, value as int),
|
||||
) ?? {},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,9 +49,9 @@ class MessageStore {
|
||||
'sentAt': msg.sentAt?.millisecondsSinceEpoch,
|
||||
'deliveredAt': msg.deliveredAt?.millisecondsSinceEpoch,
|
||||
'tripTimeMs': msg.tripTimeMs,
|
||||
'forceFlood': msg.forceFlood,
|
||||
'pathLength': msg.pathLength,
|
||||
'pathBytes': msg.pathBytes.isNotEmpty ? base64Encode(msg.pathBytes) : null,
|
||||
'reactions': msg.reactions,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -79,11 +79,13 @@ class MessageStore {
|
||||
? DateTime.fromMillisecondsSinceEpoch(json['deliveredAt'] as int)
|
||||
: null,
|
||||
tripTimeMs: json['tripTimeMs'] as int?,
|
||||
forceFlood: json['forceFlood'] as bool? ?? false,
|
||||
pathLength: json['pathLength'] as int?,
|
||||
pathBytes: json['pathBytes'] != null
|
||||
? Uint8List.fromList(base64Decode(json['pathBytes'] as String))
|
||||
: Uint8List(0),
|
||||
reactions: (json['reactions'] as Map<String, dynamic>?)?.map(
|
||||
(key, value) => MapEntry(key, value as int),
|
||||
) ?? {},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user