Removed mut requirement for window.on_drag_drop_event.

This commit is contained in:
Brian Carlsen 2024-07-23 11:53:33 +02:00
parent 694a3f6f87
commit eae62c1e5c
No known key found for this signature in database
GPG key ID: B14D281A79B2DDB7

View file

@ -324,14 +324,11 @@ impl Window {
/// The listener is triggered when the user hovers the selected files on the webview,
/// drops the files or cancels the operation.
///
/// You need to call unlisten if your handler goes out of scope e.g. the component is unmounted
/// unlisten();
///
/// # Returns
/// Function to unlisten to the event.
/// Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
pub async fn on_drag_drop_event(
&mut self,
&self,
) -> crate::Result<impl Stream<Item = Event<DragDropEvent>>> {
let (tx, rx) = mpsc::unbounded::<Event<DragDropEvent>>();