Closed ammargitham closed 1 year ago
When using Modifier.zoomable(), the onClick is not called if zoomed using double tap.
Modifier.zoomable()
Sample code:
Image( modifier = Modifier .fillMaxSize() .zoomable( state = zoomableState, onClick = { _ -> Log.d(TAG, "click") }, ), painter = it, contentDescription = null, )
The above onClick log is printed initially, but after doing a double tap it stop logging a single tap. On debugging it seems the variable isQuickZooming remains true even after the zoom animation is completed.
isQuickZooming
https://github.com/saket/telephoto/blob/5f0ed247d55394832fedc4813e0e53e82f6d6439/zoomable/src/main/kotlin/me/saket/telephoto/zoomable/Zoomable.kt#L92
I have the same issue 😢
I'll make a release with this fix soon. In the meantime y'all can unblock yourself by using 0.4.0-SNAPSHOT.
0.4.0-SNAPSHOT
When using
Modifier.zoomable()
, the onClick is not called if zoomed using double tap.Sample code:
The above onClick log is printed initially, but after doing a double tap it stop logging a single tap. On debugging it seems the variable
isQuickZooming
remains true even after the zoom animation is completed.https://github.com/saket/telephoto/blob/5f0ed247d55394832fedc4813e0e53e82f6d6439/zoomable/src/main/kotlin/me/saket/telephoto/zoomable/Zoomable.kt#L92