Skip to content

Commit be7718a

Browse files
committed
fix(android): @volatile on paused for cross-thread visibility
1 parent e721645 commit be7718a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

android/src/new/java/com/rive/RiveReactNativeView.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ class RiveReactNativeView(context: ThemedReactContext) : FrameLayout(context) {
7777
private var disposed = false
7878
private var lastFrameTimeNs = 0L
7979
private var frameCount = 0L
80+
81+
@Volatile
8082
private var paused = false
8183

8284
private val textureView = TextureView(context).apply {
@@ -211,7 +213,6 @@ class RiveReactNativeView(context: ThemedReactContext) : FrameLayout(context) {
211213
if (dataBindingChanged || initialUpdate) {
212214
applyDataBinding(config.bindData, config.riveFile)
213215
}
214-
215216
}
216217

217218
private fun resizeArtboardIfLayout() {

0 commit comments

Comments
 (0)