feat: add a quick edit workflow using the up arrow key

neochat now supports a quick edit shortcut, which helps to edit
the last message from the user in a room.

Apply 1 suggestion(s) to 1 file(s)

remove comment
This commit is contained in:
Srevin Saju
2021-04-03 21:05:59 +03:00
parent 75a2ba86ee
commit f007e96fdf
5 changed files with 49 additions and 0 deletions

View File

@@ -651,6 +651,12 @@ Kirigami.ScrollablePage {
goToLastMessage();
}
}
onEditLastUserMessage: {
const targetMessage = messageEventModel.getLastLocalUserMessageEventId();
if (targetMessage) {
ChatBoxHelper.edit(targetMessage["body"], targetMessage["body"], targetMessage["event_id"]);
}
}
}
background: FancyEffectsContainer {