From 1189615d1b9dec33b091e3d62ed73ba8b4665ba9 Mon Sep 17 00:00:00 2001 From: talksik Date: Sat, 11 Jun 2022 18:35:54 -0500 Subject: [PATCH] Update ConversationProvider.tsx --- .../desktop/src/providers/ConversationProvider.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/desktop/src/providers/ConversationProvider.tsx b/packages/desktop/src/providers/ConversationProvider.tsx index 0b79736..d7b1186 100644 --- a/packages/desktop/src/providers/ConversationProvider.tsx +++ b/packages/desktop/src/providers/ConversationProvider.tsx @@ -163,6 +163,8 @@ export function ConversationProvider({ children }: { children: React.ReactNode } /** * temporaryOverrideSort: tell me if you want to temporarily prioritize this conversation above all others */ + // ! PROBLEM: this is not updating if the conversation map updates...thus should just select conversation by + // selecting an id and making sure that it's in the map and the views just use the id to access from map const selectConversation = useCallback( async (conversationId: string, temporaryOverrideSort = false) => { /** @@ -210,7 +212,13 @@ export function ConversationProvider({ children }: { children: React.ReactNode } return conversationToSelect; }); }, - [conversationMap, setSelectedConversation, setConversationMap, handleUntuneFromLine], + [ + conversationMap, + setSelectedConversation, + setConversationMap, + handleUntuneFromLine, + handleTuneIntoLine, + ], ); const handleStartConversation = useCallback(