event-actions: Add toast for copied messages
Part-of: <https://gitlab.gnome.org/GNOME/fractal/-/merge_requests/1146>
This commit is contained in:
parent
e0d89e8da1
commit
76d2de4338
1 changed files with 2 additions and 0 deletions
|
@ -143,6 +143,7 @@ where
|
|||
"copy-text",
|
||||
clone!(@weak self as widget => move |_, _| {
|
||||
widget.clipboard().set_text(&text_message.body);
|
||||
toast!(widget, gettext("Message copied to clipboard"));
|
||||
})
|
||||
);
|
||||
}
|
||||
|
@ -173,6 +174,7 @@ where
|
|||
let display_name = event.sender().display_name();
|
||||
let message = display_name + " " + &message.body;
|
||||
widget.clipboard().set_text(&message);
|
||||
toast!(widget, gettext("Message copied to clipboard"));
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue