notify about a fling only when it actually executes

This makes sure that we need to meet all of the thresholds and actually start the fling camera animation before dispatching the onFLing event. Previously, it would be dispatched as soon as the compat detector fired.
This commit is contained in:
Łukasz Paczos
2020-04-28 15:28:30 +02:00
parent 9bfe77df40
commit 9ae33ea9cc

View File

@@ -410,8 +410,6 @@ final class MapGestureDetector {
return false;
}
notifyOnFlingListeners();
if (!uiSettings.isFlingVelocityAnimationEnabled()) {
return false;
}
@@ -443,6 +441,7 @@ final class MapGestureDetector {
}
transform.cancelTransitions();
notifyOnFlingListeners();
cameraChangeDispatcher.onCameraMoveStarted(REASON_API_GESTURE);
// update transformation