hybrid-navigation 2.13.16 → 2.13.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,6 +5,7 @@ import android.os.Bundle;
|
|
|
5
5
|
import android.view.KeyEvent;
|
|
6
6
|
|
|
7
7
|
import androidx.annotation.NonNull;
|
|
8
|
+
import androidx.fragment.app.Fragment;
|
|
8
9
|
|
|
9
10
|
import com.facebook.common.logging.FLog;
|
|
10
11
|
import com.facebook.infer.annotation.Assertions;
|
|
@@ -71,7 +72,11 @@ public class ReactAppCompatActivity extends AwesomeActivity implements DefaultHa
|
|
|
71
72
|
activityDelegate.onResume();
|
|
72
73
|
}
|
|
73
74
|
inflateStyle();
|
|
74
|
-
|
|
75
|
+
// 部分手机,如三星,Activity 销毁后重建,不会重建 Fragment。
|
|
76
|
+
Fragment fragment = getSupportFragmentManager().findFragmentById(android.R.id.content);
|
|
77
|
+
if (fragment == null) {
|
|
78
|
+
createMainComponent();
|
|
79
|
+
}
|
|
75
80
|
}
|
|
76
81
|
|
|
77
82
|
private void createMainComponent() {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hybrid-navigation",
|
|
3
3
|
"description": "React Native Navigation that supports seamless navigation between Native and React.",
|
|
4
|
-
"version": "2.13.
|
|
4
|
+
"version": "2.13.17",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
7
7
|
"react-native": "src/index",
|