Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 2a182ab

Browse files
author
Richard Hua
authored
Merge pull request #485 from Microsoft/tweak-demo-app
Keep sync button visible in example app for prolonged testing
2 parents 6e4df51 + 928a899 commit 2a182ab

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

Examples/CodePushDemoApp/demo.js

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,7 @@ class CodePushDemoApp extends Component {
7171
}
7272

7373
render() {
74-
let syncView, syncButton, progressView;
75-
76-
if (this.state.syncMessage) {
77-
syncView = (
78-
<Text style={styles.messages}>{this.state.syncMessage}</Text>
79-
);
80-
} else {
81-
syncButton = (
82-
<TouchableOpacity onPress={this.sync.bind(this)}>
83-
<Text style={styles.syncButton}>Start Sync!</Text>
84-
</TouchableOpacity>
85-
);
86-
}
74+
let progressView;
8775

8876
if (this.state.progress) {
8977
progressView = (
@@ -96,8 +84,10 @@ class CodePushDemoApp extends Component {
9684
<Text style={styles.welcome}>
9785
Welcome to CodePush!
9886
</Text>
99-
{syncButton}
100-
{syncView}
87+
<TouchableOpacity onPress={this.sync.bind(this)}>
88+
<Text style={styles.syncButton}>Start Sync!</Text>
89+
</TouchableOpacity>
90+
<Text style={styles.messages}>{this.state.syncMessage || ""}</Text>
10191
{progressView}
10292
<Image style={styles.image} resizeMode={Image.resizeMode.contain} source={require("./images/laptop_phone_howitworks.png")}/>
10393
<TouchableOpacity onPress={this.toggleAllowRestart.bind(this)}>

0 commit comments

Comments
 (0)