|
@@ -76,7 +76,6 @@ const JSNavigationScheme = 'react-js-navigation';
|
76
|
76
|
type State = {|
|
77
|
77
|
viewState: WebViewState,
|
78
|
78
|
lastErrorEvent: ?WebViewError,
|
79
|
|
- startInLoadingState: boolean,
|
80
|
79
|
|};
|
81
|
80
|
|
82
|
81
|
const DataDetectorTypes = [
|
|
@@ -137,18 +136,13 @@ class WebView extends React.Component<WebViewSharedProps, State> {
|
137
|
136
|
};
|
138
|
137
|
|
139
|
138
|
state = {
|
140
|
|
- viewState: WebViewState.IDLE,
|
|
139
|
+ viewState: this.props.startInLoadingState ? WebViewState.LOADING : WebViewState.IDLE,
|
141
|
140
|
lastErrorEvent: null,
|
142
|
|
- startInLoadingState: true,
|
143
|
141
|
};
|
144
|
142
|
|
145
|
143
|
webViewRef = React.createRef();
|
146
|
144
|
|
147
|
145
|
UNSAFE_componentWillMount() {
|
148
|
|
- if (this.props.startInLoadingState) {
|
149
|
|
- this.setState({ viewState: WebViewState.LOADING });
|
150
|
|
- }
|
151
|
|
-
|
152
|
146
|
if (
|
153
|
147
|
this.props.useWebKit === true &&
|
154
|
148
|
this.props.scalesPageToFit !== undefined
|