mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-09-18 21:10:40 +08:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
00c1eac457 | ||
![]() |
84ffaa7f5a |
@@ -135,13 +135,12 @@ public class UpdateModule extends ReactContextBaseJavaModule{
|
|||||||
loadField.set(instanceManager, loader);
|
loadField.set(instanceManager, loader);
|
||||||
}
|
}
|
||||||
|
|
||||||
final Method recreateMethod = instanceManager.getClass().getMethod("recreateReactContextInBackground");
|
try {
|
||||||
|
instanceManager.recreateReactContextInBackground();
|
||||||
final ReactInstanceManager finalizedInstanceManager = instanceManager;
|
} catch(Throwable err) {
|
||||||
|
|
||||||
recreateMethod.invoke(finalizedInstanceManager);
|
|
||||||
|
|
||||||
activity.recreate();
|
activity.recreate();
|
||||||
|
}
|
||||||
|
|
||||||
} catch (Throwable err) {
|
} catch (Throwable err) {
|
||||||
Log.e("pushy", "Failed to restart application", err);
|
Log.e("pushy", "Failed to restart application", err);
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-native-update",
|
"name": "react-native-update",
|
||||||
"version": "5.2.7",
|
"version": "5.2.8",
|
||||||
"description": "react-native hot update",
|
"description": "react-native hot update",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
Reference in New Issue
Block a user