Skip to content

Commit a328cd9

Browse files
committed
Fix broken chat input's ArrowUp/ArrowDown
1 parent e48cf2b commit a328cd9

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

‎src/lib/appImManager.ts‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,25 +1250,28 @@ export class AppImManager extends EventListenerBase<{
12501250
!appDialogsManager.contextMenu?.hasAddToFolderOpen() &&
12511251
!chat?.input?.editMsgId
12521252
) {
1253-
cancelEvent(e);
1254-
12551253
const forReply = e.metaKey || e.ctrlKey;
12561254
if(!forReply && !chat?.input?.isInputEmpty()) {
12571255
return;
12581256
}
12591257

1260-
if(forReply && !(await chat.canSend())) {
1261-
return;
1262-
}
1263-
12641258
const up = key === 'ArrowUp';
12651259
const {replyToMsgId} = this.chat.input;
12661260
const {peerId, threadId} = this.chat;
1267-
const middleware = this.chat.bubbles.getMiddleware();
12681261
if((!forReply && !up) || (forReply && !up && !replyToMsgId)) {
12691262
return;
12701263
}
12711264

1265+
cancelEvent(e);
1266+
const middleware = this.chat.bubbles.getMiddleware();
1267+
if(forReply && !(await chat.canSend())) {
1268+
return;
1269+
}
1270+
1271+
if(!middleware()) {
1272+
return;
1273+
}
1274+
12721275
this.managers.appMessagesManager.getFirstMessageToEdit({
12731276
peerId,
12741277
threadId,

0 commit comments

Comments
 (0)