Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -325,13 +325,8 @@ class RiveReactNativeView(private val context: ThemedReactContext) : FrameLayout

fun pause() {
try {
if (riveAnimationView?.playingAnimations?.isNotEmpty() == true) {
riveAnimationView!!.pause(riveAnimationView!!.playingAnimations.first().name)
} else if (riveAnimationView?.playingStateMachines?.isNotEmpty() == true) {
riveAnimationView!!.pause(riveAnimationView!!.playingStateMachines.first().name, true)
} else {
riveAnimationView?.pause()
}
// Unnamed play() can start both animations and state machines.
riveAnimationView?.pause()
} catch (ex: RiveException) {
handleRiveException(ex)
}
Expand Down