mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Support reload in ReactDelegate (#43521)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43521 Changelog: [Android] [Added] - Support reload() in ReactDelegate Reviewed By: cortinico Differential Revision: D54967602 fbshipit-source-id: adfa200cabcbecf9507775ac38f17c9d01b2671a
This commit is contained in:
@@ -159,6 +159,7 @@ public class com/facebook/react/ReactDelegate {
|
||||
public fun onKeyLongPress (I)Z
|
||||
public fun onNewIntent (Landroid/content/Intent;)Z
|
||||
public fun onWindowFocusChanged (Z)V
|
||||
public fun reload ()V
|
||||
public fun shouldShowDevMenuOrReload (ILandroid/view/KeyEvent;)Z
|
||||
}
|
||||
|
||||
|
||||
@@ -229,6 +229,13 @@ public class ReactDelegate {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void reload() {
|
||||
DevSupportManager devSupportManager = getDevSupportManager();
|
||||
if (devSupportManager != null) {
|
||||
devSupportManager.handleReloadJS();
|
||||
}
|
||||
}
|
||||
|
||||
public void loadApp() {
|
||||
loadApp(mMainComponentName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user