revert D2631410

Differential Revision: D2655673

fb-gh-sync-id: 115247373767690e63a0d6ce812a578d26b47289
This commit is contained in:
Nathan Spaun
2015-11-13 17:35:25 -08:00
committed by facebook-github-bot-5
parent e406dccaf9
commit 39ec693866
7 changed files with 165 additions and 247 deletions

View File

@@ -18,7 +18,6 @@
var React = require('react-native');
var {
PixelRatio,
ProgressBarAndroid,
StyleSheet,
Text,
TextInput,
@@ -62,6 +61,7 @@ class Downloader extends React.Component {
this.setState({
downloaded: xhr.responseText.length,
});
console.log(xhr.responseText.length);
} else if (xhr.readyState === xhr.DONE) {
if (this.cancelled) {
this.cancelled = false;
@@ -83,8 +83,6 @@ class Downloader extends React.Component {
}
};
xhr.open('GET', 'http://www.gutenberg.org/cache/epub/100/pg100.txt');
// Avoid gzip so we can actually show progress
xhr.setRequestHeader('Accept-Encoding', '');
xhr.send();
this.xhr = xhr;
@@ -116,8 +114,6 @@ class Downloader extends React.Component {
return (
<View>
{button}
<ProgressBarAndroid progress={(this.state.downloaded / this.state.contentSize)}
styleAttr="Horizontal" indeterminate={false} />
<Text>{this.state.status}</Text>
</View>
);