Skip to content

Commit 81c9361

Browse files
authored
fix(OnSuspend): Reset ReactChoreographer when app suspends (microsoft#1487)
ReactChoreographer needs to be reset to ensure that additional operations aren't enqueued on the dispatcher. Fixes microsoft#1474
1 parent e36c473 commit 81c9361

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ReactWindows/ReactNative.Shared/ReactInstanceManager.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ public void OnSuspend()
247247

248248
MoveToBeforeResumeLifecycleState();
249249

250+
ReactChoreographer.Dispose();
250251
DispatcherHelpers.Reset();
251252
}
252253

@@ -279,6 +280,7 @@ public void OnResume(Action onBackPressed)
279280
{
280281
DispatcherHelpers.Initialize();
281282
DispatcherHelpers.AssertOnDispatcher();
283+
ReactChoreographer.Initialize();
282284

283285
_defaultBackButtonHandler = onBackPressed;
284286
_suspendCancellation = new CancellationDisposable();

0 commit comments

Comments
 (0)