Skip to content

Commit

Permalink
runfix: switch to the recent tab on conversation creation with a serv…
Browse files Browse the repository at this point in the history
…ice (WPB-9509) (#17758)
  • Loading branch information
V-Gira authored Jul 16, 2024
1 parent 1c39586 commit e751e79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/script/components/Modals/ServiceModal/ServiceModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -44,8 +45,11 @@ const ServiceModal: React.FC<ServiceModalProps> = ({
actionsViewModel,
onClose,
}) => {
const {setCurrentTab: setCurrentSidebarTab} = useSidebarStore();

const onOpenService = () => {
onClose?.();
setCurrentSidebarTab(SidebarTabs.RECENT);
actionsViewModel.open1to1ConversationWithService(service);
};

Expand Down

0 comments on commit e751e79

Please sign in to comment.