Add Alt-F to forward messages

This commit is contained in:
Nicolas Werner 2021-04-27 12:09:00 +02:00
parent 788131daf0
commit 5b6671f063
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
1 changed files with 13 additions and 1 deletions

View File

@ -165,7 +165,19 @@ ScrollView {
sequence: "Alt+Down" sequence: "Alt+Down"
onActivated: { onActivated: {
var idx = chat.model.reply ? chat.model.idToIndex(chat.model.reply) - 1 : -1; var idx = chat.model.reply ? chat.model.idToIndex(chat.model.reply) - 1 : -1;
chat.model.reply = idx >= 0 ? chat.model.indexToId(idx) : undefined; chat.model.reply = idx >= 0 ? chat.model.indexToId(idx) : null;
}
}
Shortcut {
sequence: "Alt+F"
onActivated: {
if (chat.model.reply) {
var forwardMess = forwardCompleterComponent.createObject(timelineRoot);
forwardMess.setMessageEventId(chat.model.reply);
forwardMess.open();
chat.model.reply = null;
}
} }
} }