feat: Add new contact and message tracking features, including unread status and removal functionality

This commit is contained in:
Janez T
2025-10-15 21:49:33 +02:00
parent 2849ab92aa
commit 6be182e20a
13 changed files with 463 additions and 48 deletions

View File

@@ -63,6 +63,9 @@ class Message {
final DateTime? deliveredAt; // When delivery was confirmed
final Uint8List? recipientPublicKey; // Full 32-byte public key of recipient (for retry)
// Read status tracking
final bool isRead; // Whether message has been read by user
Message({
required this.id,
required this.messageType,
@@ -83,6 +86,7 @@ class Message {
this.roundTripTimeMs,
this.deliveredAt,
this.recipientPublicKey,
this.isRead = false,
});
/// Get sender public key as hex string
@@ -222,6 +226,7 @@ class Message {
int? roundTripTimeMs,
DateTime? deliveredAt,
Uint8List? recipientPublicKey,
bool? isRead,
}) {
return Message(
id: id ?? this.id,
@@ -243,6 +248,7 @@ class Message {
roundTripTimeMs: roundTripTimeMs ?? this.roundTripTimeMs,
deliveredAt: deliveredAt ?? this.deliveredAt,
recipientPublicKey: recipientPublicKey ?? this.recipientPublicKey,
isRead: isRead ?? this.isRead,
);
}