Skip to content

Commit 396e6e0

Browse files
committed
fix: duplicates in Reply stack
1 parent 7837fbe commit 396e6e0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/global/actions/ui/messages.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,10 @@ addActionHandler('focusMessage', (global, actions, payload): ActionReturnType =>
460460

461461
if (replyMessageId) {
462462
const replyStack = selectReplyStack(global, chatId, threadId, tabId) || [];
463-
global = replaceTabThreadParam(global, chatId, threadId, 'replyStack', [...replyStack, replyMessageId], tabId);
463+
464+
if (replyMessageId !== replyStack[replyStack.length - 1]) {
465+
global = replaceTabThreadParam(global, chatId, threadId, 'replyStack', [...replyStack, replyMessageId], tabId);
466+
}
464467
}
465468

466469
if (shouldSwitchChat) {

0 commit comments

Comments
 (0)