add icon, also misc improvments

This commit is contained in:
zach
2025-12-30 20:04:53 -07:00
parent baf92ef672
commit dc9f172d01
41 changed files with 609 additions and 145 deletions
+10
View File
@@ -1,5 +1,6 @@
import 'dart:typed_data';
import '../connector/meshcore_protocol.dart';
import '../helpers/reaction_helper.dart';
import '../helpers/smaz.dart';
enum ChannelMessageStatus { pending, sent, failed }
@@ -38,6 +39,7 @@ class ChannelMessage {
final String? replyToMessageId;
final String? replyToSenderName;
final String? replyToText;
final Map<String, int> reactions;
ChannelMessage({
this.senderKey,
@@ -56,7 +58,9 @@ class ChannelMessage {
this.replyToMessageId,
this.replyToSenderName,
this.replyToText,
Map<String, int>? reactions,
}) : messageId = messageId ?? '${timestamp.millisecondsSinceEpoch}_${senderName.hashCode}_${text.hashCode}',
reactions = reactions ?? {},
pathBytes = pathBytes ?? Uint8List(0),
pathVariants = _mergePathVariants(
pathBytes ?? Uint8List(0),
@@ -75,6 +79,7 @@ class ChannelMessage {
String? replyToMessageId,
String? replyToSenderName,
String? replyToText,
Map<String, int>? reactions,
}) {
return ChannelMessage(
senderKey: senderKey,
@@ -93,6 +98,7 @@ class ChannelMessage {
replyToMessageId: replyToMessageId ?? this.replyToMessageId,
replyToSenderName: replyToSenderName ?? this.replyToSenderName,
replyToText: replyToText ?? this.replyToText,
reactions: reactions ?? this.reactions,
);
}
@@ -233,6 +239,10 @@ class ChannelMessage {
actualMessage: match.group(2)!,
);
}
static ReactionInfo? parseReaction(String text) {
return ReactionHelper.parseReaction(text);
}
}
class ReplyInfo {