Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: message details click closes right panel if clicked on new details button #15539

Merged
merged 1 commit into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/script/components/Conversation/Conversation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export const Conversation: FC<ConversationProps> = ({

const showMessageDetails = (message: Message, showLikes = false) => {
if (!is1to1) {
openRightSidebar(PanelState.MESSAGE_DETAILS, {entity: message, showLikes});
openRightSidebar(PanelState.MESSAGE_DETAILS, {entity: message, showLikes}, true);
}
};

Expand Down
6 changes: 2 additions & 4 deletions src/script/page/AppMain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,9 @@ const AppMain: FC<AppMainProps> = ({

if (isDifferentId || isDifferentState) {
goTo(panelState, params);

return;
} else {
closeRightSidebar();
}

closeRightSidebar();
};

// To be changed when design chooses a breakpoint, the conditional can be integrated to the ui-kit directly
Expand Down
Loading