avoiding duplicated drag event updates

This commit is contained in:
Adam Brown 2021-11-24 14:22:12 +00:00
parent 755e3fe932
commit bbb3a6139f

View file

@ -140,6 +140,7 @@ class VoiceMessageRecorderView @JvmOverloads constructor(
}
private fun onDrag(currentDragState: DraggingState, newDragState: DraggingState) {
if (currentDragState == newDragState) return
when (newDragState) {
is DraggingState.Cancelling -> voiceMessageViews.renderCancelling(newDragState.distanceX)
is DraggingState.Locking -> {