This commit is contained in:
Antonio Scandurra 2023-10-26 18:17:45 +02:00
parent 516236e044
commit 8e3314e680
9 changed files with 167 additions and 130 deletions

View file

@ -331,9 +331,8 @@ pub trait StatefulInteractive<V: 'static>: StatelessInteractive<V> {
self.stateful_interaction().drag_listener =
Some(Box::new(move |view_state, cursor_offset, cx| {
let drag = listener(view_state, cx);
let view_handle = cx.handle().upgrade().unwrap();
let drag_handle_view = Some(
view(view_handle, move |view_state, cx| {
view(cx.handle().upgrade().unwrap(), move |view_state, cx| {
(drag.render_drag_handle)(view_state, cx)
})
.into_any(),