File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class RiveReactNativeView: UIView {
2323 private var riveUIView : RiveUIView ?
2424 private var riveInstance : RiveRuntime . Rive ?
2525 private var eventListeners : [ ( UnifiedRiveEvent ) -> Void ] = [ ]
26- private var viewReadyContinuation : CheckedContinuation < Void , Never > ?
26+ private var viewReadyContinuations : [ CheckedContinuation < Void , Never > ] = [ ]
2727 private var isViewReady = false
2828 private var configTask : Task < Void , Never > ?
2929 private var isPaused = false
@@ -33,7 +33,7 @@ class RiveReactNativeView: UIView {
3333 func awaitViewReady( ) async -> Bool {
3434 if !isViewReady {
3535 await withCheckedContinuation { continuation in
36- viewReadyContinuation = continuation
36+ viewReadyContinuations . append ( continuation)
3737 }
3838 }
3939 return true
@@ -108,8 +108,10 @@ class RiveReactNativeView: UIView {
108108
109109 if !self . isViewReady {
110110 self . isViewReady = true
111- self . viewReadyContinuation? . resume ( )
112- self . viewReadyContinuation = nil
111+ for continuation in self . viewReadyContinuations {
112+ continuation. resume ( )
113+ }
114+ self . viewReadyContinuations. removeAll ( )
113115 }
114116 RCTLog ( " [RiveReactNativeView] Configuration complete! " )
115117 } catch {
You can’t perform that action at this time.
0 commit comments