PR feedback
This commit is contained in:
parent
76981229ab
commit
9bcebfaf29
|
@ -58,13 +58,12 @@ public class RealmReactModule extends ReactContextBaseJavaModule {
|
|||
if (!isContextInjected()) {
|
||||
startWebServer();
|
||||
}
|
||||
startWebServer();
|
||||
return Collections.EMPTY_MAP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCatalystInstanceDestroy() {
|
||||
clearFlag();
|
||||
clearContextInjectedFlag();
|
||||
stopWebServer();
|
||||
}
|
||||
|
||||
|
@ -133,7 +132,7 @@ public class RealmReactModule extends ReactContextBaseJavaModule {
|
|||
private native boolean isContextInjected();
|
||||
|
||||
// clear the flag set when injecting Realm API
|
||||
private native void clearFlag();
|
||||
private native void clearContextInjectedFlag();
|
||||
|
||||
// fileDir: path of the internal storage of the application
|
||||
private native void setDefaultRealmFileDirectory(String fileDir);
|
||||
|
|
|
@ -50,13 +50,12 @@ JNIEXPORT jstring JNICALL Java_io_realm_react_RealmReactModule_processChromeDebu
|
|||
|
||||
JNIEXPORT jboolean JNICALL Java_io_realm_react_RealmReactModule_isContextInjected
|
||||
(JNIEnv *env, jclass)
|
||||
{
|
||||
return realmContextInjected;
|
||||
}
|
||||
{
|
||||
return realmContextInjected;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_io_realm_react_RealmReactModule_clearFlag
|
||||
JNIEXPORT void JNICALL Java_io_realm_react_RealmReactModule_clearContextInjectedFlag
|
||||
(JNIEnv *env, jclass)
|
||||
{
|
||||
realmContextInjected = false;//might not be needed
|
||||
|
||||
}
|
||||
{
|
||||
realmContextInjected = false;
|
||||
}
|
||||
|
|
|
@ -38,9 +38,9 @@ JNIEXPORT jboolean JNICALL Java_io_realm_react_RealmReactModule_isContextInjecte
|
|||
|
||||
/*
|
||||
* Class: io_realm_react_RealmReactModule
|
||||
* Method: clearFlag
|
||||
* Method: clearContextInjectedFlag
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_io_realm_react_RealmReactModule_clearFlag
|
||||
JNIEXPORT void JNICALL Java_io_realm_react_RealmReactModule_clearContextInjectedFlag
|
||||
(JNIEnv *, jclass);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue