mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-23 09:56:00 +03:00
avoiding duplicated drag event updates
This commit is contained in:
parent
755e3fe932
commit
bbb3a6139f
1 changed files with 1 additions and 0 deletions
|
@ -140,6 +140,7 @@ class VoiceMessageRecorderView @JvmOverloads constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun onDrag(currentDragState: DraggingState, newDragState: DraggingState) {
|
private fun onDrag(currentDragState: DraggingState, newDragState: DraggingState) {
|
||||||
|
if (currentDragState == newDragState) return
|
||||||
when (newDragState) {
|
when (newDragState) {
|
||||||
is DraggingState.Cancelling -> voiceMessageViews.renderCancelling(newDragState.distanceX)
|
is DraggingState.Cancelling -> voiceMessageViews.renderCancelling(newDragState.distanceX)
|
||||||
is DraggingState.Locking -> {
|
is DraggingState.Locking -> {
|
||||||
|
|
Loading…
Reference in a new issue