feat: Implement expandable expertise tags on the agent detail screen and adjust chat screen lifecycle to clear active conversation in deactivate.

This commit is contained in:
pradeepkumar
2026-03-20 02:42:01 +05:30
parent 38423d1586
commit cbb9034424
4 changed files with 101 additions and 37 deletions

View File

@@ -90,6 +90,14 @@ class _ChatScreenState extends ConsumerState<ChatScreen>
}
}
@override
@override
void deactivate() {
// Clear active conversation while ref is still valid (before dispose)
ref.read(messagingProvider.notifier).setActiveConversation(null);
super.deactivate();
}
@override
void dispose() {
WidgetsBinding.instance.removeObserver(this);
@@ -99,7 +107,6 @@ class _ChatScreenState extends ConsumerState<ChatScreen>
_socket.stopTyping(widget.conversationId);
}
_socket.leaveConversation(widget.conversationId);
ref.read(messagingProvider.notifier).setActiveConversation(null);
PushNotificationService().activeConversationId = null;
_messageController.dispose();
_scrollController.dispose();