Commit d5214a1d authored by Christopher Davis's avatar Christopher Davis 🌱

fractal-gtk: Send redaction events

When moving our architecture to using GAction, the delete
action was forgotten. This meant that while "Delete Message"
showed in the UI, the button did nothing.

Fixes #515
parent 2b9349d2
Pipeline #126286 passed with stages
in 34 minutes and 9 seconds
......@@ -122,6 +122,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="action_name">room_history.delete</property>
<property name="text" translatable="yes">Delete Message</property>
</object>
<packing>
......
......@@ -167,6 +167,14 @@ pub fn new(backend: Sender<BKCommand>, server_url: Url, ui: UI) -> gio::SimpleAc
}
});
let b = backend.clone();
let u = server_url.clone();
delete.connect_activate(move |_, data| {
if let Some(m) = get_message(data) {
let _ = b.send(BKCommand::SendMsgRedaction(u.clone(), m));
}
});
load_more_messages.connect_activate(clone!(server_url => move |_, data| {
let id = get_room_id(data);
request_more_messages(&backend, server_url.clone(), id);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment