make editing inline, add up arrow shortcut

This commit is contained in:
ouwou
2023-07-15 01:02:35 -04:00
parent 52a340e366
commit 00524cefa2
13 changed files with 102 additions and 84 deletions

View File

@@ -565,6 +565,16 @@ void ChatInput::StopReplying() {
m_input.Get().get_style_context()->remove_class("replying");
}
void ChatInput::StartEditing(const Message &message) {
m_input.Get().grab_focus();
m_input.Get().get_style_context()->add_class("editing");
GetBuffer()->set_text(message.Content);
}
void ChatInput::StopEditing() {
m_input.Get().get_style_context()->remove_class("editing");
}
bool ChatInput::AddFileAsImageAttachment(const Glib::RefPtr<Gio::File> &file) {
try {
const auto read_stream = file->read();