From e751e79ddcce42e1d7756b4f9f0a8a3cd1219103 Mon Sep 17 00:00:00 2001 From: Virgile <78490891+V-Gira@users.noreply.github.com> Date: Tue, 16 Jul 2024 09:43:58 +0200 Subject: [PATCH] runfix: switch to the recent tab on conversation creation with a service (WPB-9509) (#17758) --- src/script/components/Modals/ServiceModal/ServiceModal.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/script/components/Modals/ServiceModal/ServiceModal.tsx b/src/script/components/Modals/ServiceModal/ServiceModal.tsx index 865d17861a2..319458985ec 100644 --- a/src/script/components/Modals/ServiceModal/ServiceModal.tsx +++ b/src/script/components/Modals/ServiceModal/ServiceModal.tsx @@ -22,6 +22,7 @@ import React from 'react'; import {Avatar, AVATAR_SIZE} from 'Components/Avatar'; import * as Icon from 'Components/Icon'; import {ModalComponent} from 'Components/ModalComponent'; +import {SidebarTabs, useSidebarStore} from 'src/script/page/LeftSidebar/panels/Conversations/state'; import {useKoSubscribableChildren} from 'Util/ComponentUtil'; import {t} from 'Util/LocalizerUtil'; import {renderElement} from 'Util/renderElement'; @@ -44,8 +45,11 @@ const ServiceModal: React.FC = ({ actionsViewModel, onClose, }) => { + const {setCurrentTab: setCurrentSidebarTab} = useSidebarStore(); + const onOpenService = () => { onClose?.(); + setCurrentSidebarTab(SidebarTabs.RECENT); actionsViewModel.open1to1ConversationWithService(service); };