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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user