Skip to content

Commit 637bfb3

Browse files
committed
Add changelog entry
1 parent 99eb7d5 commit 637bfb3

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- accessibility: correct `aria-posinset` for chat list #5044
2020
- don't close context menues on window resize #5418
2121
- tauri: accessibility: fix focus always being locked on the message input #5125
22+
- fix: remove the option to select info messages with Ctrl + Up/Down #5337
2223

2324
<a id="2_11_1"></a>
2425

packages/frontend/src/hooks/chat/useDraft.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,11 @@ export function useDraft(
252252
)
253253

254254
const { jumpToMessage } = useMessage()
255+
256+
/**
257+
* Support the Ctrl/Cmd+Up/Down shortcuts to select a message
258+
* to reply to and set the quote in the draft accordingly
259+
*/
255260
const onSelectReplyToShortcut = async (
256261
upOrDown:
257262
| KeybindAction.Composer_SelectReplyToUp
@@ -291,7 +296,6 @@ export function useDraft(
291296
messageCache[id]?.chatId === chatId &&
292297
messageCache[id]?.isInfo === false
293298
)
294-
console.log('messageIds', messageIds)
295299
const currQuote = draftRef.current.quote
296300
if (!currQuote) {
297301
if (upOrDown === KeybindAction.Composer_SelectReplyToUp) {
@@ -312,7 +316,7 @@ export function useDraft(
312316
const fullIndex = fullMsgIdList.findIndex(m => m === currQuote.messageId)
313317
if (fullIndex !== -1) {
314318
// message is in the full list, just not in the cache (yet)
315-
// -> jump to it, it will be loaded then
319+
// -> jump to it, it will be loaded then (and the surrounding messages)
316320
quoteMessage(currQuote.messageId, true)
317321
return
318322
} else {

0 commit comments

Comments
 (0)