check if message is editable

This commit is contained in:
ouwou committed 2023-07-15 21:14:39 -04:00
1 parent add48af094
commit 52b52eb489
5 files changed
+19 -12

No files matched your search

+1 -1
View File
@@ -288,7 +288,7 @@ bool ChatWindow::OnInputSubmit(ChatSubmitParams data) {
bool ChatWindow::ProcessKeyEvent(GdkEventKey *e) {
if (e->type != GDK_KEY_PRESS) return false;
if (e->keyval == GDK_KEY_Up && !(e->state & GDK_SHIFT_MASK) && m_input->IsEmpty()) {
const auto edit_id = m_chat->GetLastSentMessage();
const auto edit_id = m_chat->GetLastSentEditableMessage();
if (edit_id.has_value()) {
StartEditing(*edit_id);
}