Skip to content

Commit da44d4f

Browse files
committed
fix(ui): move onZoomRatioOnPinchChanged to the main thread
1 parent 534cf8c commit da44d4f

File tree

1 file changed

+4
-1
lines changed
  • ui/src/main/java/io/github/thibaultbee/streampack/ui/views

1 file changed

+4
-1
lines changed

ui/src/main/java/io/github/thibaultbee/streampack/ui/views/PreviewView.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,10 @@ class PreviewView @JvmOverloads constructor(
511511
mutex.withLock {
512512
val zoom = source.settings.zoom
513513
zoom.onPinch(scaleFactor)
514-
listener?.onZoomRationOnPinchChanged(zoom.getZoomRatio())
514+
val newZoomRatio = zoom.getZoomRatio()
515+
post {
516+
listener?.onZoomRationOnPinchChanged(newZoomRatio)
517+
}
515518
}
516519
}
517520
return true

0 commit comments

Comments
 (0)