feat: Implement conversation mute and favorite features with UI integration and state management.

This commit is contained in:
pradeepkumar
2026-03-19 17:03:44 +05:30
parent 32ec839016
commit 858c912df9
4 changed files with 121 additions and 3 deletions

View File

@@ -90,6 +90,10 @@ class Conversation {
final int userUnreadCount;
final int agentUnreadCount;
final int unreadCount;
final bool userMuted;
final bool agentMuted;
final bool userFavorited;
final bool agentFavorited;
final String createdAt;
final String updatedAt;
final OtherParty otherParty;
@@ -104,6 +108,10 @@ class Conversation {
this.userUnreadCount = 0,
this.agentUnreadCount = 0,
this.unreadCount = 0,
this.userMuted = false,
this.agentMuted = false,
this.userFavorited = false,
this.agentFavorited = false,
required this.createdAt,
required this.updatedAt,
required this.otherParty,
@@ -120,6 +128,10 @@ class Conversation {
userUnreadCount: json['userUnreadCount'] as int? ?? 0,
agentUnreadCount: json['agentUnreadCount'] as int? ?? 0,
unreadCount: json['unreadCount'] as int? ?? 0,
userMuted: json['userMuted'] as bool? ?? false,
agentMuted: json['agentMuted'] as bool? ?? false,
userFavorited: json['userFavorited'] as bool? ?? false,
agentFavorited: json['agentFavorited'] as bool? ?? false,
createdAt: json['createdAt'] as String,
updatedAt: json['updatedAt'] as String,
otherParty:
@@ -134,6 +146,10 @@ class Conversation {
int? unreadCount,
String? lastMessageAt,
String? lastMessageText,
bool? userMuted,
bool? agentMuted,
bool? userFavorited,
bool? agentFavorited,
OtherParty? otherParty,
List<ChatMessage>? messages,
}) {
@@ -146,6 +162,10 @@ class Conversation {
userUnreadCount: userUnreadCount,
agentUnreadCount: agentUnreadCount,
unreadCount: unreadCount ?? this.unreadCount,
userMuted: userMuted ?? this.userMuted,
agentMuted: agentMuted ?? this.agentMuted,
userFavorited: userFavorited ?? this.userFavorited,
agentFavorited: agentFavorited ?? this.agentFavorited,
createdAt: createdAt,
updatedAt: updatedAt,
otherParty: otherParty ?? this.otherParty,