|
@@ -201,16 +201,18 @@ export default class AutoHeightWebView extends PureComponent {
|
201
|
201
|
return;
|
202
|
202
|
}
|
203
|
203
|
this.finishInterval = false;
|
204
|
|
- this.interval = setInterval(() => {
|
205
|
|
- if (!this.finishInterval) {
|
206
|
|
- isBelowKitKat ? this.sendToWebView('getBodyHeight') : this.postMessage('getBodyHeight');
|
207
|
|
- }
|
208
|
|
- }, 205);
|
|
204
|
+ this.setState({
|
|
205
|
+ interval: setInterval(() => {
|
|
206
|
+ if (!this.finishInterval) {
|
|
207
|
+ isBelowKitKat ? this.sendToWebView('getBodyHeight') : this.postMessage('getBodyHeight');
|
|
208
|
+ }
|
|
209
|
+ }, 205)
|
|
210
|
+ });
|
209
|
211
|
}
|
210
|
212
|
|
211
|
213
|
stopInterval() {
|
212
|
214
|
this.finishInterval = true;
|
213
|
|
- clearInterval(this.interval);
|
|
215
|
+ clearInterval(this.state.interval);
|
214
|
216
|
}
|
215
|
217
|
|
216
|
218
|
onMessage = e => {
|