|
|
@@ -142,15 +142,17 @@ public class JitsiMeetView extends FrameLayout {
|
|
142
|
142
|
props.putString("url", url.toString());
|
|
143
|
143
|
}
|
|
144
|
144
|
|
|
145
|
|
- if (mReactRootView == null) {
|
|
146
|
|
- mReactRootView = new ReactRootView(getContext());
|
|
147
|
|
- mReactRootView.startReactApplication(mReactInstanceManager, "App", props);
|
|
148
|
|
- mReactRootView.setBackgroundColor(BACKGROUND_COLOR);
|
|
149
|
|
- addView(mReactRootView);
|
|
150
|
|
- } else {
|
|
151
|
|
- // TODO: ReactRootView#setAppProperties is only available on React Native 0.45.
|
|
152
|
|
- throw new RuntimeException("Not yet supported");
|
|
|
145
|
+ // TODO: ReactRootView#setAppProperties is only available on React Native 0.45, so destroy
|
|
|
146
|
+ // the current root view and create a new one.
|
|
|
147
|
+ if (mReactRootView != null) {
|
|
|
148
|
+ removeView(mReactRootView);
|
|
|
149
|
+ mReactRootView = null;
|
|
153
|
150
|
}
|
|
|
151
|
+
|
|
|
152
|
+ mReactRootView = new ReactRootView(getContext());
|
|
|
153
|
+ mReactRootView.startReactApplication(mReactInstanceManager, "App", props);
|
|
|
154
|
+ mReactRootView.setBackgroundColor(BACKGROUND_COLOR);
|
|
|
155
|
+ addView(mReactRootView);
|
|
154
|
156
|
}
|
|
155
|
157
|
|
|
156
|
158
|
/**
|