Implement message deletion functionality: add isDeleted flag to Message model, update deleteMessage method in MessageRepository, and adjust chat display for deleted messages.

This commit is contained in:
Van Leemput Dayron
2025-11-14 00:54:28 +01:00
parent 79cf3f4655
commit 258f10b42b
5 changed files with 42 additions and 60 deletions

View File

@@ -476,8 +476,12 @@ class _ChatGroupContentState extends State<ChatGroupContent> {
const SizedBox(height: 4),
],
Text(
message.text,
style: TextStyle(fontSize: 15, color: textColor),
message.isDeleted ? 'a supprimé un message' : message.text,
style: TextStyle(
fontSize: 15,
color: message.isDeleted ? textColor.withValues(alpha: 0.5) : textColor,
fontStyle: message.isDeleted ? FontStyle.italic : FontStyle.normal,
),
),
const SizedBox(height: 4),
Row(