@@ -11,7 +11,7 @@ import {
1111 View ,
1212} from 'react-native' ;
1313
14- import CodePush from "react-native-code-push" ;
14+ import CodePush from "@srcpush/ react-native-code-push" ;
1515
1616class App extends Component < { } > {
1717 constructor ( ) {
@@ -20,7 +20,7 @@ class App extends Component<{}> {
2020 }
2121
2222 codePushStatusDidChange ( syncStatus ) {
23- switch ( syncStatus ) {
23+ switch ( syncStatus ) {
2424 case CodePush . SyncStatus . CHECKING_FOR_UPDATE :
2525 this . setState ( { syncMessage : "Checking for update." } ) ;
2626 break ;
@@ -86,9 +86,9 @@ class App extends Component<{}> {
8686 this . codePushDownloadDidProgress . bind ( this )
8787 ) ;
8888 }
89-
89+
9090 restartApp ( ) {
91- CodePush . restartApp ( ) ;
91+ CodePush . restartApp ( ) ;
9292 }
9393
9494 render ( ) {
@@ -101,35 +101,35 @@ class App extends Component<{}> {
101101 }
102102
103103 return (
104- < SafeAreaView >
105- < ScrollView >
106- < View style = { styles . container } >
107- < Text style = { styles . welcome } >
108- Welcome to CodePush!
109- </ Text >
110- < Text style = { styles . welcome } >
111- Demo bundle
112- </ Text >
113- < TouchableOpacity onPress = { this . restartApp . bind ( this ) } >
114- < Text style = { styles . syncButton } > Press to restart</ Text >
115- </ TouchableOpacity >
116- < TouchableOpacity onPress = { this . sync . bind ( this ) } >
117- < Text style = { styles . syncButton } > Press for background sync</ Text >
118- </ TouchableOpacity >
119- < TouchableOpacity onPress = { this . syncImmediate . bind ( this ) } >
120- < Text style = { styles . syncButton } > Press for dialog-driven sync</ Text >
121- </ TouchableOpacity >
122- { progressView }
123- < TouchableOpacity onPress = { this . toggleAllowRestart . bind ( this ) } >
124- < Text style = { styles . restartToggleButton } > Restart { this . state . restartAllowed ? "allowed" : "forbidden" } </ Text >
125- </ TouchableOpacity >
126- < TouchableOpacity onPress = { this . getUpdateMetadata . bind ( this ) } >
127- < Text style = { styles . syncButton } > Press for Update Metadata</ Text >
128- </ TouchableOpacity >
129- < Text style = { styles . messages } > { this . state . syncMessage || "" } </ Text >
130- </ View >
131- </ ScrollView >
132- </ SafeAreaView >
104+ < SafeAreaView >
105+ < ScrollView >
106+ < View style = { styles . container } >
107+ < Text style = { styles . welcome } >
108+ Welcome to CodePush!
109+ </ Text >
110+ < Text style = { styles . welcome } >
111+ Demo bundle
112+ </ Text >
113+ < TouchableOpacity onPress = { this . restartApp . bind ( this ) } >
114+ < Text style = { styles . syncButton } > Press to restart</ Text >
115+ </ TouchableOpacity >
116+ < TouchableOpacity onPress = { this . sync . bind ( this ) } >
117+ < Text style = { styles . syncButton } > Press for background sync</ Text >
118+ </ TouchableOpacity >
119+ < TouchableOpacity onPress = { this . syncImmediate . bind ( this ) } >
120+ < Text style = { styles . syncButton } > Press for dialog-driven sync</ Text >
121+ </ TouchableOpacity >
122+ { progressView }
123+ < TouchableOpacity onPress = { this . toggleAllowRestart . bind ( this ) } >
124+ < Text style = { styles . restartToggleButton } > Restart { this . state . restartAllowed ? "allowed" : "forbidden" } </ Text >
125+ </ TouchableOpacity >
126+ < TouchableOpacity onPress = { this . getUpdateMetadata . bind ( this ) } >
127+ < Text style = { styles . syncButton } > Press for Update Metadata</ Text >
128+ </ TouchableOpacity >
129+ < Text style = { styles . messages } > { this . state . syncMessage || "" } </ Text >
130+ </ View >
131+ </ ScrollView >
132+ </ SafeAreaView >
133133 ) ;
134134 }
135135}
0 commit comments