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:
@@ -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(
|
||||
|
||||
@@ -127,17 +127,6 @@ class _GroupContentState extends State<GroupContent> {
|
||||
child: ListView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
children: [
|
||||
const Text(
|
||||
'Mes groupes',
|
||||
style: TextStyle(fontSize: 28, fontWeight: FontWeight.bold),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
'Discutez avec les participants',
|
||||
style: TextStyle(fontSize: 14, color: Colors.grey[600]),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
...groups.map((group) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(bottom: 12),
|
||||
|
||||
Reference in New Issue
Block a user