Commit b0fc317 1 parent fc660d6 commit b0fc317 Copy full SHA for b0fc317
File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
1
/* @flow strict-local */
2
2
import React , { Component } from 'react' ;
3
- import { Platform } from 'react-native' ;
3
+ import { Platform , View } from 'react-native' ;
4
4
import { WebView } from 'react-native-webview' ;
5
5
import type { WebViewNavigation } from 'react-native-webview' ;
6
6
@@ -199,6 +199,15 @@ class MessageList extends Component<Props> {
199
199
return false ;
200
200
} ;
201
201
202
+ renderLoading = ( ) => {
203
+ const style = {
204
+ backgroundColor : 'transparent' ,
205
+ width : '100%' ,
206
+ height : '100%' ,
207
+ } ;
208
+ return < View style = { style } /> ;
209
+ } ;
210
+
202
211
render ( ) {
203
212
const { styles : contextStyles } = this . context ;
204
213
const {
@@ -290,6 +299,8 @@ class MessageList extends Component<Props> {
290
299
return (
291
300
< WebView
292
301
useWebKit
302
+ startInLoadingState
303
+ renderLoading = { this . renderLoading }
293
304
source = { { baseUrl, html } }
294
305
originWhitelist = { [ 'file://' ] }
295
306
onShouldStartLoadWithRequest = { onShouldStartLoadWithRequest }
You can’t perform that action at this time.
0 commit comments