From ccf9eec973f1bcb2e12c469395221698411e5aa5 Mon Sep 17 00:00:00 2001 From: hupeng Date: Mon, 25 Mar 2019 11:13:01 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=98=BE=E7=A4=BA][=E4=BF=AE=E6=94=B9]:?= =?UTF-8?q?=E5=B0=81=E8=A3=85=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.js | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/App.js b/App.js index 17e675a..cd5a098 100644 --- a/App.js +++ b/App.js @@ -424,21 +424,24 @@ getContentView() { } } -render() { - - if (this.state.progress) { - if (this.state.progress.totalBytes > 0) - return ( - {this.state.syncMessage}{'\n'} - {this.state.progress.receivedBytes} of {this.state.progress.totalBytes} bytes received{'\n'} - - ); +getUpdateView() { + if (this.state.progress.totalBytes > 0) return ( - {this.state.syncMessage} + {this.state.syncMessage}{'\n'} + {this.state.progress.receivedBytes} of {this.state.progress.totalBytes} bytes received{'\n'} ); - } + return ( + {this.state.syncMessage} + + ); +} + +render() { + if (this.state.progress) { + this.getUpdateView(); + } return (