At issue is that the root of the file system is nearly full, which forbids dragging an item. However, the cart itself may not be full, so it's still possible to drag the file(s) to a sub-folder on the cart. When completing the drag, a necessary argument was set to null. This happened because the drag drop data that identifies the root menu layout ViewModel was never set.
The fix is simple - update that data during the drag once a valid drop target is hit.
There is an argument to be made that we could always set this data, or never even need to set it and always just assume based on other application state. Perhaps for another day. This fix dovetails neatly into existing code, and makes use of a return value that was previously ignored.
The odd code layout (not using an AND) is a sop to unit test / code coverage plans for the future.
This fixes Issue #343
At issue is that the root of the file system is nearly full, which forbids dragging an item. However, the cart itself may not be full, so it's still possible to drag the file(s) to a sub-folder on the cart. When completing the drag, a necessary argument was set to
null
. This happened because the drag drop data that identifies the root menu layout ViewModel was never set.The fix is simple - update that data during the drag once a valid drop target is hit.
There is an argument to be made that we could always set this data, or never even need to set it and always just assume based on other application state. Perhaps for another day. This fix dovetails neatly into existing code, and makes use of a return value that was previously ignored.
The odd code layout (not using an AND) is a sop to unit test / code coverage plans for the future.