From faba527061e8ae60e2b43158eabffc84ff9ff811 Mon Sep 17 00:00:00 2001 From: anish-work Date: Thu, 29 Aug 2024 19:51:15 +0530 Subject: [PATCH] fix auto-playing audio messages on load --- src/components/shared/Layout/SideNavbar.tsx | 5 ++-- src/contexts/ConversationLayer.tsx | 30 ++++++++++++------- src/contexts/MessagesContext.tsx | 22 ++++++++++---- src/contexts/SystemContext.tsx | 10 +++++-- src/contexts/types.ts | 2 +- .../copilot/components/Messages/index.tsx | 25 ++++++++++------ 6 files changed, 63 insertions(+), 31 deletions(-) diff --git a/src/components/shared/Layout/SideNavbar.tsx b/src/components/shared/Layout/SideNavbar.tsx index e82f81e..12a7683 100644 --- a/src/components/shared/Layout/SideNavbar.tsx +++ b/src/components/shared/Layout/SideNavbar.tsx @@ -61,7 +61,8 @@ const SideNavbar = () => { if (lastMessageTimestamp >= today && lastMessageTimestamp <= endToday) { subheading = "Today"; } else if ( - lastMessageTimestamp >= yesterday && lastMessageTimestamp <= endYesterday + lastMessageTimestamp >= yesterday && + lastMessageTimestamp <= endYesterday ) { subheading = "Yesterday"; } else if ( @@ -111,7 +112,7 @@ const SideNavbar = () => { ].filter((group) => group?.conversations?.length > 0); }, [conversations]); - if (config?.disableConversations) return null; + if (!layoutController?.showNewConversationButton) return null; return (