qml: enable default transitions only when drag and drop is feasible in `ListViewExt`
I wanted to use the Component approach, with relying on the JS engine's garbage collection, like I do in the scroll bar case (not creating the scroll bar when the scroll bar is irrelevant) but it was not possible here. It seems that Transition sets up the animations based on its parent, and I could not find a "target" property in Transition. Instead, I simply bind `enabled` of the transition to whether `acceptDropFunc` is valid. Testing `acceptDropFunc` is a good practice when checking whether the drag and drop is feasible in the view. This fixes the problem of the initial items getting animated when media library views load the (initial) items asynchronously. We don't want the initial items to be animated. The playlist media library views are going to be still be affected by this, as they support drag and drop and we want the transitions there, but there is not much to do about that here.
Loading
Please register or sign in to comment