mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-06-09 20:25:15 +08:00
Merge pull request #485 from Microsoft/tweak-demo-app
Keep sync button visible in example app for prolonged testing
This commit is contained in:
@@ -71,19 +71,7 @@ class CodePushDemoApp extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
let syncView, syncButton, progressView;
|
||||
|
||||
if (this.state.syncMessage) {
|
||||
syncView = (
|
||||
<Text style={styles.messages}>{this.state.syncMessage}</Text>
|
||||
);
|
||||
} else {
|
||||
syncButton = (
|
||||
<TouchableOpacity onPress={this.sync.bind(this)}>
|
||||
<Text style={styles.syncButton}>Start Sync!</Text>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
}
|
||||
let progressView;
|
||||
|
||||
if (this.state.progress) {
|
||||
progressView = (
|
||||
@@ -96,8 +84,10 @@ class CodePushDemoApp extends Component {
|
||||
<Text style={styles.welcome}>
|
||||
Welcome to CodePush!
|
||||
</Text>
|
||||
{syncButton}
|
||||
{syncView}
|
||||
<TouchableOpacity onPress={this.sync.bind(this)}>
|
||||
<Text style={styles.syncButton}>Start Sync!</Text>
|
||||
</TouchableOpacity>
|
||||
<Text style={styles.messages}>{this.state.syncMessage || ""}</Text>
|
||||
{progressView}
|
||||
<Image style={styles.image} resizeMode={Image.resizeMode.contain} source={require("./images/laptop_phone_howitworks.png")}/>
|
||||
<TouchableOpacity onPress={this.toggleAllowRestart.bind(this)}>
|
||||
|
||||
Reference in New Issue
Block a user