fix(frame): recreate frame if no cached one found on app resume #5318 (#5330)

This commit is contained in:
Alexander Djenkov
2018-01-25 11:37:47 +02:00
committed by Alexander Vakrilov
parent af934ccabf
commit 9d7f0e5315

View File

@@ -945,7 +945,7 @@ function setActivityContent(activity: android.app.Activity, savedInstanceState:
if (!rootView) { if (!rootView) {
// If we have frameId from extras - we are starting a new activity from navigation (e.g. new Frame().navigate())) // If we have frameId from extras - we are starting a new activity from navigation (e.g. new Frame().navigate()))
// Then we check if we have frameId from savedInstanceState - this happens when Activity is destroyed but app was not (e.g. suspend) // Then we check if we have frameId from savedInstanceState - this happens when Activity is destroyed but app was not (e.g. suspend)
rootView = frameId >= 0 ? getFrameById(frameId) : new Frame(); rootView = getFrameById(frameId) || new Frame();
} }
if (rootView instanceof Frame) { if (rootView instanceof Frame) {