fix dragged view disappears if drop is cancelled

This commit is contained in:
darthpaul 2021-09-25 22:05:30 +01:00
parent f87ca68946
commit 7689295ea0

View File

@ -781,7 +781,14 @@ class WeekFragment : Fragment(), WeeklyCalendar {
}
// handle ACTION_DRAG_LOCATION due to https://stackoverflow.com/a/19460338
DragEvent.ACTION_DRAG_LOCATION -> true
DragEvent.ACTION_DROP -> {
view.beVisible()
true
}
DragEvent.ACTION_DRAG_ENDED -> {
if (!dragEvent.result) {
view.beVisible()
}
currentlyDraggedView = null
true
}