From b6018afce858a588cee42ba88f88a18674dc4ecc Mon Sep 17 00:00:00 2001 From: talksik Date: Mon, 20 Jun 2022 12:00:37 -0500 Subject: [PATCH] deselecting working now --- packages/desktop/src/providers/ConversationProvider.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/desktop/src/providers/ConversationProvider.tsx b/packages/desktop/src/providers/ConversationProvider.tsx index 177c100..0e6c6d7 100644 --- a/packages/desktop/src/providers/ConversationProvider.tsx +++ b/packages/desktop/src/providers/ConversationProvider.tsx @@ -206,7 +206,7 @@ export function ConversationProvider({ children }: { children: React.ReactNode } // selecting an id and making sure that it's in the map and the views just use the id to access from map // get conversation from universe...hit if it's local, miss and fetch if not here const selectConversation = useCallback( - async (conversationId: string, temporaryOverrideSort = false) => { + async (conversationId?: string, temporaryOverrideSort = false) => { /** * see if there is such a conversation in our map * if not, then go and fetch it from backend @@ -214,7 +214,7 @@ export function ConversationProvider({ children }: { children: React.ReactNode } */ if (!conversationId) { - toast.error('must select a conversation'); + setSelectedConversation(undefined); return; }