fix(dnd): leave event handlers should expect None as the drag Id

This commit is contained in:
Ashley Wulber 2025-05-20 22:28:57 -04:00 committed by Michael Murphy
parent a46483f161
commit ce56237ab9
3 changed files with 17 additions and 7 deletions

View file

@ -733,9 +733,8 @@ where
entity,
);
}
DndEvent::Offer(id, OfferEvent::Leave | OfferEvent::LeaveDestination)
if Some(my_id) == *id =>
{
DndEvent::Offer(id, OfferEvent::LeaveDestination) if Some(my_id) != *id => {}
DndEvent::Offer(id, OfferEvent::Leave | OfferEvent::LeaveDestination) => {
if let Some(Some(entity)) = entity {
if let Some(on_dnd_leave) = self.on_dnd_leave.as_ref() {
shell.publish(on_dnd_leave(entity));