Skip to content

Commit

Permalink
fix(chat): create new conversation after unsharing selected (Issue #2681
Browse files Browse the repository at this point in the history
) (#2682)
  • Loading branch information
IlyaBondar authored Nov 27, 2024
1 parent 14b3f0a commit 2112409
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions apps/chat/src/store/share/share.epics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -908,23 +908,13 @@ const discardSharedWithMeSuccessEpic: AppEpic = (action$, state$) =>
: conversations.filter((conv) => conv.id !== payload.resourceId);

if (!newSelectedConversationsIds.length) {
if (newConversations.length) {
actions.push(
of(
ConversationsActions.selectConversations({
conversationIds: [newConversations[0].id],
}),
),
);
} else {
actions.push(
of(
ConversationsActions.createNewConversations({
names: [translate(DEFAULT_CONVERSATION_NAME)],
}),
),
);
}
actions.push(
of(
ConversationsActions.createNewConversations({
names: [translate(DEFAULT_CONVERSATION_NAME)],
}),
),
);
}

if (!payload.isFolder) {
Expand Down

0 comments on commit 2112409

Please sign in to comment.